summaryrefslogtreecommitdiff
path: root/sys/kern/tty_tty.c
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2003-09-23 16:51:15 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2003-09-23 16:51:15 +0000
commit6bb276a1685d8546283d224a3d249c66cc329264 (patch)
tree5e1c80d6cad38a8a82f5832e1e315103e7029eb9 /sys/kern/tty_tty.c
parent96675671ec2520ade2f83b31563ab4da72bd443d (diff)
Replace select backends with poll backends. selscan() and pollscan()
now call the poll backend. With this change we implement greater poll(2) functionality instead of emulating it via the select backend. Adapted from NetBSD and including some changes from FreeBSD. Tested by many, deraadt@ OK
Diffstat (limited to 'sys/kern/tty_tty.c')
-rw-r--r--sys/kern/tty_tty.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/kern/tty_tty.c b/sys/kern/tty_tty.c
index 6c09bf4dbad..2c6ea90231b 100644
--- a/sys/kern/tty_tty.c
+++ b/sys/kern/tty_tty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty_tty.c,v 1.7 2003/06/02 23:28:06 millert Exp $ */
+/* $OpenBSD: tty_tty.c,v 1.8 2003/09/23 16:51:12 millert Exp $ */
/* $NetBSD: tty_tty.c,v 1.13 1996/03/30 22:24:46 christos Exp $ */
/*-
@@ -143,14 +143,14 @@ cttyioctl(dev, cmd, addr, flag, p)
/*ARGSUSED*/
int
-cttyselect(dev, flag, p)
+cttypoll(dev, events, p)
dev_t dev;
- int flag;
+ int events;
struct proc *p;
{
struct vnode *ttyvp = cttyvp(p);
- if (ttyvp == NULL)
- return (1); /* try operation to get EOF/failure */
- return (VOP_SELECT(ttyvp, flag, FREAD|FWRITE, NOCRED, p));
+ if (ttyvp == NULL) /* try operation to get EOF/failure */
+ return (seltrue(dev, events, p));
+ return (VOP_POLL(ttyvp, events, p));
}