On Tue, Jun 26, 2012 at 1:09 AM, Christopher James Halse Rogers <[email protected]> wrote: > The legacy logic was embarassingly wrong; AuthMagic should return errno, > so returning FALSE only when AuthMagic returns nonzero is exactly wrong. > > https://bugs.freedesktop.org/show_bug.cgi?id=51400 > Signed-off-by: Christopher James Halse Rogers > <[email protected]> > --- > hw/xfree86/dri2/dri2.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c > index d0f1789..c171cb5 100644 > --- a/hw/xfree86/dri2/dri2.c > +++ b/hw/xfree86/dri2/dri2.c > @@ -1111,14 +1111,14 @@ DRI2Connect(ScreenPtr pScreen, unsigned int > driverType, int *fd, > return TRUE; > } > > -static Bool > +static int > DRI2AuthMagic (ScreenPtr pScreen, uint32_t magic) > { > DRI2ScreenPtr ds = DRI2GetScreen(pScreen); > - if (ds == NULL || (*ds->LegacyAuthMagic) (ds->fd, magic)) > - return FALSE; > + if (ds == NULL) > + return EINVAL;
Probably should just return -EINVAL here I'd guess, since the legacy one in xf86drm.c returns -errno from the kernel ioctl which would be EINVAL -> -EINVAL. or just return -1. Dave. _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
