bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH gnumach 1/3] Use Mach native error codes instead of POSIX err


From: Guillem Jover
Subject: Re: [PATCH gnumach 1/3] Use Mach native error codes instead of POSIX errno E* ones
Date: Tue, 6 Sep 2011 02:39:08 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Tue, 2011-09-06 at 01:04:02 +0200, Thomas Schwinge wrote:
> On Thu,  1 Sep 2011 20:24:56 +0200, Guillem Jover <guillem@hadrons.org> wrote:
> > * device/errno.h: Remove file.
> > [...]
> 
> > diff --git a/i386/i386at/kd_mouse.c b/i386/i386at/kd_mouse.c
> > index 640209c..770a3fe 100644
> > --- a/i386/i386at/kd_mouse.c
> > +++ b/i386/i386at/kd_mouse.c
> > @@ -179,10 +179,10 @@ mouseopen(dev, flags)
> >  #ifdef     MACH_KERNEL
> >  #else      /* MACH_KERNEL */
> >     if (flags & FWRITE)
> > -           return(ENODEV);
> > +           return (D_NO_SUCH_DEVICE);
> 
> This has actually been !MACH_KERNEL usage of ENODEV.

> >  #ifndef    MACH_KERNEL
> >     if (tp->t_state & TS_XCLUDE && u.u_uid != 0)
> > -           return(EBUSY);
> > +           return (D_ALREADY_OPEN);
> >  #endif     /* MACH_KERNEL */
> 
> This has actually been !MACH_KERNEL usage of EBUSY.

Hmmm, right, I doubted about those ones, but cannot remember why I
ended up switching them. Checking now it seems !MACH_KERNEL is in
use when combined with a BSD kernel?

> Should we get rid of the !MACH_KERNEL code?

Probably, I doubt it has not bit rot during this time, and it's dead
code for us anyway. Otherwise I can send a patch reverting those
hunks.

regards,
guillem



reply via email to

[Prev in Thread] Current Thread [Next in Thread]