From 026f55873b827a14db61e6c2c246c454bb3b7b9f Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Thu, 1 Sep 2011 20:24:56 +0200 Subject: Use Mach native error codes instead of POSIX errno E* ones * device/errno.h: Remove file. * Makefrag.am (libkernel_a_SOURCES): Remove `device/errno.h'. * i386/i386at/com.c: Include instead of . (comopen): Replace ENXIO with D_NO_SUCH_DEVICE. * i386/i386at/kd_event.c: Include instead of . * i386/i386at/kd_mouse.c: Likewise. (mouseopen): Replace ENODEV with D_NO_SUCH_DEVICE and EBUSY with D_ALREADY_OPEN. * i386/i386at/lpr.c: Include instead of . (lpropen): Replace ENXIO with D_NO_SUCH_DEVICE and EBUSY with D_ALREADY_OPEN. --- i386/i386at/lpr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'i386/i386at/lpr.c') 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 @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include #include #else /* MACH_KERNEL */ @@ -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); tp = &lpr_tty[unit]; #ifndef MACH_KERNEL if (tp->t_state & TS_XCLUDE && u.u_uid != 0) - return(EBUSY); + return (D_ALREADY_OPEN); #endif /* MACH_KERNEL */ addr = (u_short) isai->address; tp->t_dev = dev; -- cgit v1.2.3