diff options
author | jlemon <jlemon@FreeBSD.org> | 2001-05-14 14:37:25 +0000 |
---|---|---|
committer | jlemon <jlemon@FreeBSD.org> | 2001-05-14 14:37:25 +0000 |
commit | 0d0226733a11d3305bbac57cee81124fcbd80713 (patch) | |
tree | 44f048d097842df0e75656365c92dbb72fad077c /sys/kern | |
parent | ed36556bbc13c4d560d0bf341552feae5399b7ea (diff) | |
download | FreeBSD-src-0d0226733a11d3305bbac57cee81124fcbd80713.zip FreeBSD-src-0d0226733a11d3305bbac57cee81124fcbd80713.tar.gz |
When calling poll() on a fd associated with a filesystem, let POLLIN/POLLOUT
behave identically to POLLRDNORM/POLLWRNORM.
Submitted by: bde
PR: 27287
merge after: 1 week
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/vfs_default.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/vfs_default.c b/sys/kern/vfs_default.c index 06e8e98..328a9b1 100644 --- a/sys/kern/vfs_default.c +++ b/sys/kern/vfs_default.c @@ -330,9 +330,9 @@ vop_stdpoll(ap) struct proc *a_p; } */ *ap; { - if ((ap->a_events & ~POLLSTANDARD) == 0) - return (ap->a_events & (POLLRDNORM|POLLWRNORM)); - return (vn_pollrecord(ap->a_vp, ap->a_p, ap->a_events)); + if (ap->a_events & ~POLLSTANDARD) + return (vn_pollrecord(ap->a_vp, ap->a_p, ap->a_events)); + return (ap->a_events & (POLLIN | POLLOUT | POLLRDNORM | POLLWRNORM)); } /* |