summaryrefslogtreecommitdiff
path: root/sys/dev/wscons/wsdisplay.c
diff options
context:
space:
mode:
authorNiels Provos <provos@cvs.openbsd.org>2001-03-01 20:54:37 +0000
committerNiels Provos <provos@cvs.openbsd.org>2001-03-01 20:54:37 +0000
commit950a6333d90c04783291b2f77e89257bc6df966e (patch)
tree0d452c7deda41df938a0f8d009e3f850249b8eb8 /sys/dev/wscons/wsdisplay.c
parent9027db9730b3cc9c6f973b4e6fbdf6b353260158 (diff)
port kqueue changes from freebsd, plus all required openbsd glue.
okay deraadt@, millert@ from jlemon@freebsd.org: extend kqueue down to the device layer, backwards compatible approach suggested by peter@freebsd.org
Diffstat (limited to 'sys/dev/wscons/wsdisplay.c')
-rw-r--r--sys/dev/wscons/wsdisplay.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/sys/dev/wscons/wsdisplay.c b/sys/dev/wscons/wsdisplay.c
index bc9cf1bfa15..552c37a67c5 100644
--- a/sys/dev/wscons/wsdisplay.c
+++ b/sys/dev/wscons/wsdisplay.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wsdisplay.c,v 1.14 2001/02/25 23:24:19 aaron Exp $ */
+/* $OpenBSD: wsdisplay.c,v 1.15 2001/03/01 20:54:33 provos Exp $ */
/* $NetBSD: wsdisplay.c,v 1.37.4.1 2000/06/30 16:27:53 simonb Exp $ */
/*
@@ -1179,6 +1179,25 @@ wsdisplayselect(dev, events, p)
return (0);
}
+int
+wsdisplaykqfilter(dev, kn)
+ dev_t dev;
+ struct knote *kn;
+{
+ struct wsdisplay_softc *sc = wsdisplay_cd.cd_devs[WSDISPLAYUNIT(dev)];
+ struct wsscreen *scr;
+
+ if (ISWSDISPLAYCTL(dev))
+ return (1);
+
+ scr = sc->sc_scr[WSDISPLAYSCREEN(dev)];
+
+ if (WSSCREEN_HAS_TTY(scr))
+ return (ttkqfilter(dev, kn));
+ else
+ return (1);
+}
+
void
wsdisplaystart(tp)
struct tty *tp;