summaryrefslogtreecommitdiffstats
path: root/sys/miscfs
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2003-09-23 16:51:11 +0000
committermillert <millert@openbsd.org>2003-09-23 16:51:11 +0000
commit154dfaaa7e8e47825c6990a73b3eba25e82ebbb9 (patch)
treebae4f380ce55fc233a68444dffc895a9dabf0b91 /sys/miscfs
parentregen (Prepare for conversion of select backend -> poll) (diff)
downloadwireguard-openbsd-154dfaaa7e8e47825c6990a73b3eba25e82ebbb9.tar.xz
wireguard-openbsd-154dfaaa7e8e47825c6990a73b3eba25e82ebbb9.zip
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/miscfs')
-rw-r--r--sys/miscfs/deadfs/dead_vnops.c19
-rw-r--r--sys/miscfs/fdesc/fdesc_vnops.c23
-rw-r--r--sys/miscfs/fifofs/fifo.h4
-rw-r--r--sys/miscfs/fifofs/fifo_vnops.c32
-rw-r--r--sys/miscfs/kernfs/kernfs.h3
-rw-r--r--sys/miscfs/kernfs/kernfs_vnops.c19
-rw-r--r--sys/miscfs/portal/portal_vnops.c20
-rw-r--r--sys/miscfs/procfs/procfs.h3
-rw-r--r--sys/miscfs/procfs/procfs_vnops.c18
-rw-r--r--sys/miscfs/specfs/spec_vnops.c17
-rw-r--r--sys/miscfs/specfs/specdev.h4
-rw-r--r--sys/miscfs/union/union_vnops.c16
12 files changed, 111 insertions, 67 deletions
diff --git a/sys/miscfs/deadfs/dead_vnops.c b/sys/miscfs/deadfs/dead_vnops.c
index cbfb7b817f7..b91827115bc 100644
--- a/sys/miscfs/deadfs/dead_vnops.c
+++ b/sys/miscfs/deadfs/dead_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dead_vnops.c,v 1.14 2003/06/02 23:28:10 millert Exp $ */
+/* $OpenBSD: dead_vnops.c,v 1.15 2003/09/23 16:51:12 millert Exp $ */
/* $NetBSD: dead_vnops.c,v 1.16 1996/02/13 13:12:48 mycroft Exp $ */
/*
@@ -40,6 +40,7 @@
#include <sys/namei.h>
#include <sys/buf.h>
#include <sys/proc.h>
+#include <sys/poll.h>
/*
* Prototypes for dead operations on vnodes.
@@ -58,7 +59,7 @@ int dead_open(void *);
int dead_read(void *);
int dead_write(void *);
int dead_ioctl(void *);
-int dead_select(void *);
+int dead_poll(void *);
#define dead_fsync nullop
#define dead_remove dead_badop
#define dead_link dead_badop
@@ -98,7 +99,7 @@ struct vnodeopv_entry_desc dead_vnodeop_entries[] = {
{ &vop_read_desc, dead_read }, /* read */
{ &vop_write_desc, dead_write }, /* write */
{ &vop_ioctl_desc, dead_ioctl }, /* ioctl */
- { &vop_select_desc, dead_select }, /* select */
+ { &vop_poll_desc, dead_poll }, /* poll */
{ &vop_fsync_desc, dead_fsync }, /* fsync */
{ &vop_remove_desc, dead_remove }, /* remove */
{ &vop_link_desc, dead_link }, /* link */
@@ -224,13 +225,21 @@ dead_ioctl(v)
/* ARGSUSED */
int
-dead_select(v)
+dead_poll(v)
void *v;
{
+#if 0
+ struct vop_poll_args /* {
+ struct vnode *a_vp;
+ int a_events;
+ struct proc *a_p;
+ } */ *ap = v;
+#endif
+
/*
* Let the user find out that the descriptor is gone.
*/
- return (1);
+ return (POLLHUP);
}
/*
diff --git a/sys/miscfs/fdesc/fdesc_vnops.c b/sys/miscfs/fdesc/fdesc_vnops.c
index beaf194076d..62fc74c0a83 100644
--- a/sys/miscfs/fdesc/fdesc_vnops.c
+++ b/sys/miscfs/fdesc/fdesc_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fdesc_vnops.c,v 1.35 2003/06/02 23:28:10 millert Exp $ */
+/* $OpenBSD: fdesc_vnops.c,v 1.36 2003/09/23 16:51:12 millert Exp $ */
/* $NetBSD: fdesc_vnops.c,v 1.32 1996/04/11 11:24:29 mrg Exp $ */
/*
@@ -60,6 +60,7 @@
#include <sys/buf.h>
#include <sys/dirent.h>
#include <sys/tty.h>
+#include <sys/poll.h>
#include <miscfs/fdesc/fdesc.h>
@@ -97,7 +98,7 @@ int fdesc_setattr(void *);
int fdesc_read(void *);
int fdesc_write(void *);
int fdesc_ioctl(void *);
-int fdesc_select(void *);
+int fdesc_poll(void *);
#define fdesc_fsync nullop
#define fdesc_remove eopnotsupp
#define fdesc_revoke vop_generic_revoke
@@ -135,7 +136,7 @@ struct vnodeopv_entry_desc fdesc_vnodeop_entries[] = {
{ &vop_write_desc, fdesc_write }, /* write */
{ &vop_ioctl_desc, fdesc_ioctl }, /* ioctl */
{ &vop_revoke_desc, fdesc_revoke }, /* revoke */
- { &vop_select_desc, fdesc_select }, /* select */
+ { &vop_poll_desc, fdesc_poll }, /* poll */
{ &vop_fsync_desc, fdesc_fsync }, /* fsync */
{ &vop_remove_desc, fdesc_remove }, /* remove */
{ &vop_link_desc, fdesc_link }, /* link */
@@ -825,29 +826,27 @@ fdesc_ioctl(v)
}
int
-fdesc_select(v)
+fdesc_poll(v)
void *v;
{
- struct vop_select_args /* {
+ struct vop_poll_args /* {
struct vnode *a_vp;
- int a_which;
- int a_fflags;
- struct ucred *a_cred;
+ int a_events;
struct proc *a_p;
} */ *ap = v;
- int error = EOPNOTSUPP;
+ int revents;
switch (VTOFDESC(ap->a_vp)->fd_type) {
case Fctty:
- error = cttyselect(devctty, ap->a_fflags, ap->a_p);
+ revents = cttypoll(devctty, ap->a_events, ap->a_p);
break;
default:
- error = EOPNOTSUPP;
+ revents = ap->a_events & (POLLIN | POLLOUT | POLLRDNORM | POLLWRNORM);
break;
}
- return (error);
+ return (revents);
}
int
diff --git a/sys/miscfs/fifofs/fifo.h b/sys/miscfs/fifofs/fifo.h
index 5dbaf84066a..9fc76eb5a00 100644
--- a/sys/miscfs/fifofs/fifo.h
+++ b/sys/miscfs/fifofs/fifo.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: fifo.h,v 1.13 2003/06/02 23:28:10 millert Exp $ */
+/* $OpenBSD: fifo.h,v 1.14 2003/09/23 16:51:13 millert Exp $ */
/* $NetBSD: fifo.h,v 1.10 1996/02/09 22:40:15 christos Exp $ */
/*
@@ -51,7 +51,7 @@ int fifo_read(void *);
int fifo_write(void *);
#define fifo_lease_check nullop
int fifo_ioctl(void *);
-int fifo_select(void *);
+int fifo_poll(void *);
int fifo_kqfilter(void *);
#define fifo_fsync nullop
#define fifo_remove fifo_badop
diff --git a/sys/miscfs/fifofs/fifo_vnops.c b/sys/miscfs/fifofs/fifo_vnops.c
index 316699e7a42..71a606bec48 100644
--- a/sys/miscfs/fifofs/fifo_vnops.c
+++ b/sys/miscfs/fifofs/fifo_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fifo_vnops.c,v 1.15 2003/06/02 23:28:10 millert Exp $ */
+/* $OpenBSD: fifo_vnops.c,v 1.16 2003/09/23 16:51:13 millert Exp $ */
/* $NetBSD: fifo_vnops.c,v 1.18 1996/03/16 23:52:42 christos Exp $ */
/*
@@ -46,6 +46,7 @@
#include <sys/event.h>
#include <sys/errno.h>
#include <sys/malloc.h>
+#include <sys/poll.h>
#include <sys/un.h>
#include <miscfs/fifofs/fifo.h>
@@ -75,7 +76,7 @@ struct vnodeopv_entry_desc fifo_vnodeop_entries[] = {
{ &vop_write_desc, fifo_write }, /* write */
{ &vop_lease_desc, fifo_lease_check }, /* lease */
{ &vop_ioctl_desc, fifo_ioctl }, /* ioctl */
- { &vop_select_desc, fifo_select }, /* select */
+ { &vop_poll_desc, fifo_poll }, /* poll */
{ &vop_kqfilter_desc, fifo_kqfilter }, /* kqfilter */
{ &vop_revoke_desc, fifo_revoke }, /* revoke */
{ &vop_fsync_desc, fifo_fsync }, /* fsync */
@@ -353,31 +354,28 @@ fifo_ioctl(v)
/* ARGSUSED */
int
-fifo_select(v)
+fifo_poll(v)
void *v;
{
- struct vop_select_args /* {
+ struct vop_poll_args /* {
struct vnode *a_vp;
- int a_which;
- int a_fflags;
- struct ucred *a_cred;
+ int a_events;
struct proc *a_p;
} */ *ap = v;
struct file filetmp;
- int ready;
+ int revents = 0;
- if (ap->a_fflags & FREAD) {
+ if (ap->a_events & (POLLIN | POLLPRI | POLLRDNORM | POLLRDBAND)) {
filetmp.f_data = (caddr_t)ap->a_vp->v_fifoinfo->fi_readsock;
- ready = soo_select(&filetmp, ap->a_which, ap->a_p);
- if (ready)
- return (ready);
- } else if (ap->a_fflags & FWRITE) {
+ if (filetmp.f_data)
+ revents |= soo_poll(&filetmp, ap->a_events, ap->a_p);
+ }
+ if (ap->a_events & (POLLOUT | POLLWRNORM | POLLWRBAND)) {
filetmp.f_data = (caddr_t)ap->a_vp->v_fifoinfo->fi_writesock;
- ready = soo_select(&filetmp, ap->a_which, ap->a_p);
- if (ready)
- return (ready);
+ if (filetmp.f_data)
+ revents |= soo_poll(&filetmp, ap->a_events, ap->a_p);
}
- return (0);
+ return (revents);
}
int
diff --git a/sys/miscfs/kernfs/kernfs.h b/sys/miscfs/kernfs/kernfs.h
index 4083055821a..8feda932cdb 100644
--- a/sys/miscfs/kernfs/kernfs.h
+++ b/sys/miscfs/kernfs/kernfs.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: kernfs.h,v 1.13 2003/08/14 07:46:39 mickey Exp $ */
+/* $OpenBSD: kernfs.h,v 1.14 2003/09/23 16:51:13 millert Exp $ */
/* $NetBSD: kernfs.h,v 1.10 1996/02/09 22:40:21 christos Exp $ */
/*
@@ -94,6 +94,7 @@ struct kernfs_node {
int *, struct ucred **))eopnotsupp)
int kernfs_init(struct vfsconf *);
+int kernfs_poll(void *);
int kernfs_allocvp(const struct kern_target *, struct mount *, struct vnode **);
const struct kern_target *kernfs_findtarget(char *, int);
extern int (**kernfs_vnodeop_p)(void *);
diff --git a/sys/miscfs/kernfs/kernfs_vnops.c b/sys/miscfs/kernfs/kernfs_vnops.c
index 26b2bd535f5..c6b834fd24e 100644
--- a/sys/miscfs/kernfs/kernfs_vnops.c
+++ b/sys/miscfs/kernfs/kernfs_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kernfs_vnops.c,v 1.34 2003/08/11 10:19:24 mickey Exp $ */
+/* $OpenBSD: kernfs_vnops.c,v 1.35 2003/09/23 16:51:13 millert Exp $ */
/* $NetBSD: kernfs_vnops.c,v 1.43 1996/03/16 23:52:47 christos Exp $ */
/*
@@ -54,6 +54,7 @@
#include <sys/buf.h>
#include <sys/dirent.h>
#include <sys/msgbuf.h>
+#include <sys/poll.h>
#include <miscfs/kernfs/kernfs.h>
#include <uvm/uvm_extern.h>
@@ -126,7 +127,6 @@ int kernfs_setattr(void *);
int kernfs_read(void *);
int kernfs_write(void *);
#define kernfs_ioctl (int (*)(void *))enoioctl
-#define kernfs_select eopnotsupp
#define kernfs_mmap eopnotsupp
#define kernfs_fsync nullop
#define kernfs_seek nullop
@@ -174,7 +174,7 @@ struct vnodeopv_entry_desc kernfs_vnodeop_entries[] = {
{ &vop_read_desc, kernfs_read }, /* read */
{ &vop_write_desc, kernfs_write }, /* write */
{ &vop_ioctl_desc, kernfs_ioctl }, /* ioctl */
- { &vop_select_desc, kernfs_select }, /* select */
+ { &vop_poll_desc, kernfs_poll }, /* poll */
{ &vop_revoke_desc, kernfs_revoke }, /* revoke */
{ &vop_fsync_desc, kernfs_fsync }, /* fsync */
{ &vop_remove_desc, kernfs_remove }, /* remove */
@@ -948,3 +948,16 @@ kernfs_badop(v)
panic("kernfs: bad op");
return 0;
}
+
+int
+kernfs_poll(v)
+ void *v;
+{
+ struct vop_poll_args /* {
+ struct vnode *a_vp;
+ int a_events;
+ struct proc *a_p;
+ } */ *ap = v;
+
+ return (ap->a_events & (POLLIN | POLLOUT | POLLRDNORM | POLLWRNORM));
+}
diff --git a/sys/miscfs/portal/portal_vnops.c b/sys/miscfs/portal/portal_vnops.c
index 68df6606c54..de608b33825 100644
--- a/sys/miscfs/portal/portal_vnops.c
+++ b/sys/miscfs/portal/portal_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: portal_vnops.c,v 1.15 2003/06/02 23:28:10 millert Exp $ */
+/* $OpenBSD: portal_vnops.c,v 1.16 2003/09/23 16:51:13 millert Exp $ */
/* $NetBSD: portal_vnops.c,v 1.17 1996/02/13 13:12:57 mycroft Exp $ */
/*
@@ -54,6 +54,7 @@
#include <sys/malloc.h>
#include <sys/namei.h>
#include <sys/mbuf.h>
+#include <sys/poll.h>
#include <sys/socket.h>
#include <sys/socketvar.h>
#include <sys/un.h>
@@ -80,7 +81,6 @@ int portal_setattr(void *);
#define portal_read eopnotsupp
#define portal_write eopnotsupp
#define portal_ioctl (int (*)(void *))enoioctl
-#define portal_select eopnotsupp
#define portal_fsync nullop
#define portal_remove eopnotsupp
int portal_link(void *);
@@ -102,6 +102,7 @@ int portal_print(void *);
int portal_pathconf(void *);
#define portal_advlock eopnotsupp
#define portal_bwrite eopnotsupp
+int portal_poll(void *);
int (**portal_vnodeop_p)(void *);
struct vnodeopv_entry_desc portal_vnodeop_entries[] = {
@@ -117,7 +118,7 @@ struct vnodeopv_entry_desc portal_vnodeop_entries[] = {
{ &vop_read_desc, portal_read }, /* read */
{ &vop_write_desc, portal_write }, /* write */
{ &vop_ioctl_desc, portal_ioctl }, /* ioctl */
- { &vop_select_desc, portal_select }, /* select */
+ { &vop_poll_desc, portal_poll }, /* poll */
{ &vop_revoke_desc, portal_revoke }, /* revoke */
{ &vop_fsync_desc, portal_fsync }, /* fsync */
{ &vop_remove_desc, portal_remove }, /* remove */
@@ -719,3 +720,16 @@ portal_badop(v)
panic ("portal: bad op");
return (0);
}
+
+int
+portal_poll(v)
+ void *v;
+{
+ struct vop_poll_args /* {
+ struct vnode *a_vp;
+ int a_events;
+ struct proc *a_p;
+ } */ *ap = v;
+
+ return (ap->a_events & (POLLIN | POLLOUT | POLLRDNORM | POLLWRNORM));
+}
diff --git a/sys/miscfs/procfs/procfs.h b/sys/miscfs/procfs/procfs.h
index c590f949c76..ced28816398 100644
--- a/sys/miscfs/procfs/procfs.h
+++ b/sys/miscfs/procfs/procfs.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: procfs.h,v 1.21 2003/08/14 07:46:40 mickey Exp $ */
+/* $OpenBSD: procfs.h,v 1.22 2003/09/23 16:51:13 millert Exp $ */
/* $NetBSD: procfs.h,v 1.17 1996/02/12 15:01:41 christos Exp $ */
/*
@@ -124,6 +124,7 @@ int procfs_docpuinfo(struct proc *, struct proc *, struct pfsnode *pfsp, struct
int procfs_domap(struct proc *, struct proc *, struct pfsnode *pfsp, struct uio *uio, int);
int procfs_freevp(struct vnode *);
int procfs_getcpuinfstr(char *, int *);
+int procfs_poll(void *);
/* functions to check whether or not files should be displayed */
int procfs_validfile(struct proc *, struct mount *);
diff --git a/sys/miscfs/procfs/procfs_vnops.c b/sys/miscfs/procfs/procfs_vnops.c
index 82fb17f7aa6..40da1bc0c2f 100644
--- a/sys/miscfs/procfs/procfs_vnops.c
+++ b/sys/miscfs/procfs/procfs_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: procfs_vnops.c,v 1.29 2003/06/02 23:28:11 millert Exp $ */
+/* $OpenBSD: procfs_vnops.c,v 1.30 2003/09/23 16:51:13 millert Exp $ */
/* $NetBSD: procfs_vnops.c,v 1.40 1996/03/16 23:52:55 christos Exp $ */
/*
@@ -52,6 +52,7 @@
#include <sys/malloc.h>
#include <sys/dirent.h>
#include <sys/resourcevar.h>
+#include <sys/poll.h>
#include <sys/ptrace.h>
#include <sys/stat.h>
@@ -131,7 +132,6 @@ int procfs_setattr(void *);
#define procfs_read procfs_rw
#define procfs_write procfs_rw
int procfs_ioctl(void *);
-#define procfs_select procfs_badop
#define procfs_fsync procfs_badop
#define procfs_remove procfs_badop
int procfs_link(void *);
@@ -171,7 +171,7 @@ struct vnodeopv_entry_desc procfs_vnodeop_entries[] = {
{ &vop_read_desc, procfs_read }, /* read */
{ &vop_write_desc, procfs_write }, /* write */
{ &vop_ioctl_desc, procfs_ioctl }, /* ioctl */
- { &vop_select_desc, procfs_select }, /* select */
+ { &vop_poll_desc, procfs_poll }, /* poll */
{ &vop_fsync_desc, procfs_fsync }, /* fsync */
{ &vop_remove_desc, procfs_remove }, /* remove */
{ &vop_link_desc, procfs_link }, /* link */
@@ -1122,3 +1122,15 @@ atopid(b, len)
return (p);
}
+int
+procfs_poll(v)
+ void *v;
+{
+ struct vop_poll_args /* {
+ struct vnode *a_vp;
+ int a_events;
+ struct proc *a_p;
+ } */ *ap = v;
+
+ return (ap->a_events & (POLLIN | POLLOUT | POLLRDNORM | POLLWRNORM));
+}
diff --git a/sys/miscfs/specfs/spec_vnops.c b/sys/miscfs/specfs/spec_vnops.c
index f945ef378ca..c3e675b5905 100644
--- a/sys/miscfs/specfs/spec_vnops.c
+++ b/sys/miscfs/specfs/spec_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: spec_vnops.c,v 1.26 2003/06/02 23:28:11 millert Exp $ */
+/* $OpenBSD: spec_vnops.c,v 1.27 2003/09/23 16:51:13 millert Exp $ */
/* $NetBSD: spec_vnops.c,v 1.29 1996/04/22 01:42:38 christos Exp $ */
/*
@@ -47,6 +47,7 @@
#include <sys/file.h>
#include <sys/disklabel.h>
#include <sys/lockf.h>
+#include <sys/poll.h>
#include <miscfs/specfs/specdev.h>
@@ -78,7 +79,7 @@ struct vnodeopv_entry_desc spec_vnodeop_entries[] = {
{ &vop_write_desc, spec_write }, /* write */
{ &vop_lease_desc, spec_lease_check }, /* lease */
{ &vop_ioctl_desc, spec_ioctl }, /* ioctl */
- { &vop_select_desc, spec_select }, /* select */
+ { &vop_poll_desc, spec_poll }, /* poll */
{ &vop_kqfilter_desc, spec_kqfilter }, /* kqfilter */
{ &vop_revoke_desc, spec_revoke }, /* revoke */
{ &vop_fsync_desc, spec_fsync }, /* fsync */
@@ -450,14 +451,12 @@ spec_ioctl(v)
/* ARGSUSED */
int
-spec_select(v)
+spec_poll(v)
void *v;
{
- struct vop_select_args /* {
+ struct vop_poll_args /* {
struct vnode *a_vp;
- int a_which;
- int a_fflags;
- struct ucred *a_cred;
+ int a_events;
struct proc *a_p;
} */ *ap = v;
register dev_t dev;
@@ -465,11 +464,11 @@ spec_select(v)
switch (ap->a_vp->v_type) {
default:
- return (1); /* XXX */
+ return (seltrue(ap->a_vp->v_rdev, ap->a_events, ap->a_p));
case VCHR:
dev = ap->a_vp->v_rdev;
- return (*cdevsw[major(dev)].d_select)(dev, ap->a_which, ap->a_p);
+ return (*cdevsw[major(dev)].d_poll)(dev, ap->a_events, ap->a_p);
}
}
/* ARGSUSED */
diff --git a/sys/miscfs/specfs/specdev.h b/sys/miscfs/specfs/specdev.h
index 4218f80edca..bb95a71025d 100644
--- a/sys/miscfs/specfs/specdev.h
+++ b/sys/miscfs/specfs/specdev.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: specdev.h,v 1.16 2003/06/02 23:28:11 millert Exp $ */
+/* $OpenBSD: specdev.h,v 1.17 2003/09/23 16:51:13 millert Exp $ */
/* $NetBSD: specdev.h,v 1.12 1996/02/13 13:13:01 mycroft Exp $ */
/*
@@ -92,7 +92,7 @@ int spec_read(void *);
int spec_write(void *);
#define spec_lease_check nullop
int spec_ioctl(void *);
-int spec_select(void *);
+int spec_poll(void *);
int spec_kqfilter(void *);
int spec_fsync(void *);
#define spec_remove spec_badop
diff --git a/sys/miscfs/union/union_vnops.c b/sys/miscfs/union/union_vnops.c
index f8968541bd2..7a6dcc2c37b 100644
--- a/sys/miscfs/union/union_vnops.c
+++ b/sys/miscfs/union/union_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: union_vnops.c,v 1.21 2003/06/02 23:28:11 millert Exp $ */
+/* $OpenBSD: union_vnops.c,v 1.22 2003/09/23 16:51:13 millert Exp $ */
/* $NetBSD: union_vnops.c,v 1.59 2002/09/27 15:37:48 provos Exp $ */
/*
@@ -70,7 +70,7 @@ int union_read(void *);
int union_write(void *);
int union_lease(void *);
int union_ioctl(void *);
-int union_select(void *);
+int union_poll(void *);
int union_fsync(void *);
int union_remove(void *);
int union_link(void *);
@@ -117,7 +117,7 @@ struct vnodeopv_entry_desc union_vnodeop_entries[] = {
{ &vop_write_desc, union_write }, /* write */
{ &vop_lease_desc, union_lease }, /* lease */
{ &vop_ioctl_desc, union_ioctl }, /* ioctl */
- { &vop_select_desc, union_select }, /* select */
+ { &vop_poll_desc, union_poll }, /* poll */
{ &vop_fsync_desc, union_fsync }, /* fsync */
{ &vop_remove_desc, union_remove }, /* remove */
{ &vop_link_desc, union_link }, /* link */
@@ -1073,20 +1073,18 @@ union_ioctl(v)
}
int
-union_select(v)
+union_poll(v)
void *v;
{
- struct vop_select_args /* {
+ struct vop_poll_args /* {
struct vnode *a_vp;
- int a_which;
- int a_fflags;
- struct ucred *a_cred;
+ int a_events;
struct proc *a_p;
} */ *ap = v;
register struct vnode *vp = OTHERVP(ap->a_vp);
ap->a_vp = vp;
- return (VCALL(vp, VOFFSET(vop_select), ap));
+ return (VCALL(vp, VOFFSET(vop_poll), ap));
}
int