summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2007-03-25 18:04:15 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2007-03-25 18:04:15 +0000
commit1a2e329031125a3273df53f12934482de4291f59 (patch)
tree9961b3d7dd8d85a13ac42356e398a3e179d5a717
parentc670dd91e076dfadb95c3b7f6a4be3ef7c6a5fe1 (diff)
POLLERR is the correct return code for poll errors
ok art deraadt miod
-rw-r--r--sys/dev/wscons/wskbd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/wscons/wskbd.c b/sys/dev/wscons/wskbd.c
index 27d39c6f242..681d40fc480 100644
--- a/sys/dev/wscons/wskbd.c
+++ b/sys/dev/wscons/wskbd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wskbd.c,v 1.53 2006/08/14 17:41:08 miod Exp $ */
+/* $OpenBSD: wskbd.c,v 1.54 2007/03/25 18:04:14 tedu Exp $ */
/* $NetBSD: wskbd.c,v 1.80 2005/05/04 01:52:16 augustss Exp $ */
/*
@@ -94,6 +94,7 @@
#include <sys/errno.h>
#include <sys/fcntl.h>
#include <sys/vnode.h>
+#include <sys/poll.h>
#include <ddb/db_var.h>
@@ -1163,7 +1164,7 @@ wskbdpoll(dev_t dev, int events, struct proc *p)
struct wskbd_softc *sc = wskbd_cd.cd_devs[minor(dev)];
if (sc->sc_base.me_evp == NULL)
- return (EINVAL);
+ return (POLLERR);
return (wsevent_poll(sc->sc_base.me_evp, events, p));
}