Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm/iomd Please only return errno values !!! ... al...



details:   https://anonhg.NetBSD.org/src/rev/feebe67f96b0
branches:  trunk
changeset: 521980:feebe67f96b0
user:      reinoud <reinoud%NetBSD.org@localhost>
date:      Sun Feb 10 00:53:28 2002 +0000

description:
Please only return errno values !!! ... also doing a bit of KNF'ing

diffstat:

 sys/arch/arm/iomd/rpckbd.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (39 lines):

diff -r e92d4c358299 -r feebe67f96b0 sys/arch/arm/iomd/rpckbd.c
--- a/sys/arch/arm/iomd/rpckbd.c        Sun Feb 10 00:49:57 2002 +0000
+++ b/sys/arch/arm/iomd/rpckbd.c        Sun Feb 10 00:53:28 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rpckbd.c,v 1.1 2001/10/05 22:27:42 reinoud Exp $       */
+/*     $NetBSD: rpckbd.c,v 1.2 2002/02/10 00:53:28 reinoud Exp $       */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -52,6 +52,7 @@
 #include <sys/device.h>
 #include <sys/malloc.h>
 #include <sys/ioctl.h>
+#include <sys/errno.h>
 
 #include <machine/bus.h>
 #include <machine/conf.h>
@@ -177,9 +178,9 @@
            case WSKBDIO_GTYPE:
                *(int *)data = WSKBD_TYPE_RISCPC;
                return 0;
-           case WSKBDIO_SETLEDS: {
+           case WSKBDIO_SETLEDS:
                /* same as rpckbd_set_leds */
-
+       
                /* check if we're allready in this state */
                new_ledstate = rpckbd_led_encode(*(int *)data);
                if (new_ledstate == sc->sc_ledstate)
@@ -190,8 +191,7 @@
                res = kbdcmd(sc, sc->sc_ledstate, 0);
                if (res == KBR_ACK)
                        return (0);
-               return (res);
-               }
+               return (EIO);
           case WSKBDIO_GETLEDS:
                *(int *)data = rpckbd_led_decode(sc->sc_ledstate);
                return (0);



Home | Main Index | Thread Index | Old Index