From 9f14177e203e926bfe0b3778871ec6fb75c3ece1 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Sun, 3 Jul 2011 18:11:22 +0000 Subject: Fix return values of wsdisplaykqfilter and move some code so it matches wsdisplaypoll. ok miod deraadt --- sys/dev/wscons/wsdisplay.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'sys/dev') 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 -- cgit v1.2.3