summaryrefslogtreecommitdiff
path: root/i386/i386at/kd_mouse.c
diff options
context:
space:
mode:
authorGuillem Jover <guillem@hadrons.org>2011-09-01 20:24:56 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2011-09-02 20:17:03 +0200
commit026f55873b827a14db61e6c2c246c454bb3b7b9f (patch)
treebf9a4a53113165c1f85326442b6df2d3cfcc9a5e /i386/i386at/kd_mouse.c
parent38369f6611561ec2557d71416f65aed4ff646308 (diff)
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 <device/device_types.h> instead of <device/errno.h>. (comopen): Replace ENXIO with D_NO_SUCH_DEVICE. * i386/i386at/kd_event.c: Include <device/device_types.h> instead of <device/errno.h>. * 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 <device/device_types.h> instead of <device/errno.h>. (lpropen): Replace ENXIO with D_NO_SUCH_DEVICE and EBUSY with D_ALREADY_OPEN.
Diffstat (limited to 'i386/i386at/kd_mouse.c')
-rw-r--r--i386/i386at/kd_mouse.c6
1 files changed, 3 insertions, 3 deletions
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
@@ -69,7 +69,7 @@ WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <kern/printf.h>
#ifdef MACH_KERNEL
#include <device/ds_routines.h>
-#include <device/errno.h>
+#include <device/device_types.h>
#include <device/io_req.h>
#include <device/subrs.h>
#else /* MACH_KERNEL */
@@ -179,10 +179,10 @@ mouseopen(dev, flags)
#ifdef MACH_KERNEL
#else /* MACH_KERNEL */
if (flags & FWRITE)
- return(ENODEV);
+ return (D_NO_SUCH_DEVICE);
#endif /* MACH_KERNEL */
if (mouse_in_use)
- return(EBUSY);
+ return (D_ALREADY_OPEN);
mouse_in_use = TRUE; /* locking? */
kdq_reset(&mouse_queue);
lastbuttons = MOUSE_ALL_UP;