diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2004-04-26 18:57:37 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2004-04-26 18:57:37 +0000 |
commit | 299594b83473a24b996014df9d0155506c86fa1b (patch) | |
tree | bc42b90e66bd0885cd21cb343a13d574909ab3a4 /sys | |
parent | c368588bbc1d38f53e616f88a16606af815dcedf (diff) |
nfs_poll cannot simply be defined to seltrue so use a stub nfs_poll
duplicated from UFS. Closes PR 3757; OK deraadt@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/nfs/nfs_vnops.c | 20 | ||||
-rw-r--r-- | sys/nfs/nfsnode.h | 4 |
2 files changed, 21 insertions, 3 deletions
diff --git a/sys/nfs/nfs_vnops.c b/sys/nfs/nfs_vnops.c index ad163a83a4f..4a8ce4e0fa9 100644 --- a/sys/nfs/nfs_vnops.c +++ b/sys/nfs/nfs_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_vnops.c,v 1.58 2004/03/02 05:46:00 tedu Exp $ */ +/* $OpenBSD: nfs_vnops.c,v 1.59 2004/04/26 18:57:36 millert Exp $ */ /* $NetBSD: nfs_vnops.c,v 1.62.4.1 1996/07/08 20:26:52 jtc Exp $ */ /* @@ -45,6 +45,7 @@ #include <sys/kernel.h> #include <sys/systm.h> #include <sys/resourcevar.h> +#include <sys/poll.h> #include <sys/proc.h> #include <sys/mount.h> #include <sys/buf.h> @@ -3064,6 +3065,23 @@ nfsspec_access(v) ap->a_cred)); } +/* ARGSUSED */ +int +nfs_poll(v) + void *v; +{ + struct vop_poll_args /* { + struct vnode *a_vp; + int a_events; + struct proc *a_p; + } */ *ap = v; + + /* + * We should really check to see if I/O is possible. + */ + return (ap->a_events & (POLLIN | POLLOUT | POLLRDNORM | POLLWRNORM)); +} + /* * Read wrapper for special devices. */ diff --git a/sys/nfs/nfsnode.h b/sys/nfs/nfsnode.h index 30696a71d5d..a0d49d6c3cd 100644 --- a/sys/nfs/nfsnode.h +++ b/sys/nfs/nfsnode.h @@ -1,4 +1,4 @@ -/* $OpenBSD: nfsnode.h,v 1.20 2004/03/02 05:46:00 tedu Exp $ */ +/* $OpenBSD: nfsnode.h,v 1.21 2004/04/26 18:57:36 millert Exp $ */ /* $NetBSD: nfsnode.h,v 1.16 1996/02/18 11:54:04 fvdl Exp $ */ /* @@ -170,7 +170,7 @@ int nfsspec_write(void *); int nfsfifo_read(void *); int nfsfifo_write(void *); #define nfs_ioctl ((int (*)(void *))enoioctl) -#define nfs_poll ((int (*)(void *))seltrue) +int nfs_poll(void *); #define nfs_revoke vop_generic_revoke int nfs_fsync(void *); int nfs_remove(void *); |