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: Thomas Schwinge
Subject: Re: [PATCH gnumach 1/3] Use Mach native error codes instead of POSIX errno E* ones
Date: Tue, 06 Sep 2011 01:04:02 +0200
User-agent: Notmuch/0.7-57-g64222ef (http://notmuchmail.org) Emacs/23.3.1 (i486-pc-linux-gnu)

Hi!

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.

>  #endif       /* MACH_KERNEL */
>       if (mouse_in_use)
> -             return(EBUSY);
> +             return (D_ALREADY_OPEN);

Correct.

> diff --git a/i386/i386at/lpr.c b/i386/i386at/lpr.c
> index 8d077d5..cf76da2 100644
> --- a/i386/i386at/lpr.c
> +++ b/i386/i386at/lpr.c
> @@ -140,11 +140,11 @@ struct tty *tp;
>  u_short addr;
>    
>       if (unit >= NLPR || (isai = lprinfo[unit]) == 0 || isai->alive == 0)
> -             return(ENXIO);
> +             return (D_NO_SUCH_DEVICE);

Correct.

>  #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.


Should we get rid of the !MACH_KERNEL code?


Grüße,
 Thomas

Attachment: pgpwU4ubL0Z7O.pgp
Description: PGP signature


reply via email to

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