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

This commit is contained in:
reinoud 2002-02-10 00:53:28 +00:00
parent d934377152
commit 8843d04234
1 changed files with 5 additions and 5 deletions

View File

@ -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 @@ rpckbd_ioctl(void *v, u_long cmd, caddr_t data, int flag, struct proc *p)
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 @@ rpckbd_ioctl(void *v, u_long cmd, caddr_t data, int flag, struct proc *p)
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);