summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2011-07-03 18:11:22 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2011-07-03 18:11:22 +0000
commit9f14177e203e926bfe0b3778871ec6fb75c3ece1 (patch)
tree4235645752825709b6414068b80c22033a89f92f /sys/dev
parent0b1a0cef45d5386ca6a2824fd394e3e2a631113b (diff)
Fix return values of wsdisplaykqfilter and move some code so it matches
wsdisplaypoll. ok miod deraadt
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/wscons/wsdisplay.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/dev/wscons/wsdisplay.c b/sys/dev/wscons/wsdisplay.c
index 70b169b2494..5bf2f31ea37 100644
--- a/sys/dev/wscons/wsdisplay.c
+++ b/sys/dev/wscons/wsdisplay.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wsdisplay.c,v 1.104 2011/06/23 16:31:16 deraadt Exp $ */
+/* $OpenBSD: wsdisplay.c,v 1.105 2011/07/03 18:11:21 nicm Exp $ */
/* $NetBSD: wsdisplay.c,v 1.82 2005/02/27 00:27:52 perry Exp $ */
/*
@@ -1411,15 +1411,15 @@ wsdisplaykqfilter(dev_t dev, struct knote *kn)
struct wsscreen *scr;
if (ISWSDISPLAYCTL(dev))
- return (1);
+ return (ENXIO);
if ((scr = sc->sc_scr[WSDISPLAYSCREEN(dev)]) == NULL)
- return (1);
+ return (ENXIO);
- if (WSSCREEN_HAS_TTY(scr))
- return (ttkqfilter(dev, kn));
- else
- return (1);
+ if (!WSSCREEN_HAS_TTY(scr))
+ return (ENXIO);
+
+ return (ttkqfilter(dev, kn));
}
void