diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2003-09-23 16:51:15 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2003-09-23 16:51:15 +0000 |
commit | 6bb276a1685d8546283d224a3d249c66cc329264 (patch) | |
tree | 5e1c80d6cad38a8a82f5832e1e315103e7029eb9 /sys/msdosfs | |
parent | 96675671ec2520ade2f83b31563ab4da72bd443d (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/msdosfs')
-rw-r--r-- | sys/msdosfs/denode.h | 4 | ||||
-rw-r--r-- | sys/msdosfs/msdosfs_vnops.c | 17 |
2 files changed, 9 insertions, 12 deletions
diff --git a/sys/msdosfs/denode.h b/sys/msdosfs/denode.h index fea3d34467c..5f5b68c62df 100644 --- a/sys/msdosfs/denode.h +++ b/sys/msdosfs/denode.h @@ -1,4 +1,4 @@ -/* $OpenBSD: denode.h,v 1.14 2003/08/14 21:26:10 tedu Exp $ */ +/* $OpenBSD: denode.h,v 1.15 2003/09/23 16:51:13 millert Exp $ */ /* $NetBSD: denode.h,v 1.24 1997/10/17 11:23:39 ws Exp $ */ /*- @@ -272,7 +272,7 @@ int lease_check(void *); #define msdosfs_lease_check nullop #endif int msdosfs_ioctl(void *); -int msdosfs_select(void *); +int msdosfs_poll(void *); int msdosfs_fsync(void *); int msdosfs_remove(void *); int msdosfs_link(void *); diff --git a/sys/msdosfs/msdosfs_vnops.c b/sys/msdosfs/msdosfs_vnops.c index f1408bec51b..8ccf6dc1b6a 100644 --- a/sys/msdosfs/msdosfs_vnops.c +++ b/sys/msdosfs/msdosfs_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: msdosfs_vnops.c,v 1.41 2003/08/15 20:32:19 tedu Exp $ */ +/* $OpenBSD: msdosfs_vnops.c,v 1.42 2003/09/23 16:51:13 millert Exp $ */ /* $NetBSD: msdosfs_vnops.c,v 1.63 1997/10/17 11:24:19 ws Exp $ */ /*- @@ -64,6 +64,7 @@ #include <sys/malloc.h> #include <sys/dirent.h> /* defines dirent structure */ #include <sys/lockf.h> +#include <sys/poll.h> #include <uvm/uvm_extern.h> @@ -706,20 +707,16 @@ msdosfs_ioctl(v) } int -msdosfs_select(v) +msdosfs_poll(v) void *v; { -#if 0 - 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; -#endif - return (1); /* DOS filesystems never block? */ + return (seltrue(ap->a_vp->v_rdev, ap->a_events, ap->a_p)); } /* @@ -1904,7 +1901,7 @@ struct vnodeopv_entry_desc msdosfs_vnodeop_entries[] = { { &vop_write_desc, msdosfs_write }, /* write */ { &vop_lease_desc, msdosfs_lease_check }, /* lease */ { &vop_ioctl_desc, msdosfs_ioctl }, /* ioctl */ - { &vop_select_desc, msdosfs_select }, /* select */ + { &vop_poll_desc, msdosfs_poll }, /* poll */ { &vop_fsync_desc, msdosfs_fsync }, /* fsync */ { &vop_remove_desc, msdosfs_remove }, /* remove */ { &vop_link_desc, msdosfs_link }, /* link */ |