Provide a 'return true' poll vnode op rather than duplicating the
'do nothing' case all over the various filesystems.
This commit is contained in:
parent
1514b90f2d
commit
7fab77996c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=29358
@ -36,7 +36,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)vfs_subr.c 8.31 (Berkeley) 5/26/95
|
||||
* $Id: vfs_subr.c,v 1.101 1997/09/07 16:20:46 bde Exp $
|
||||
* $Id: vfs_subr.c,v 1.102 1997/09/13 15:02:28 peter Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -54,6 +54,7 @@
|
||||
#include <sys/stat.h>
|
||||
#include <sys/buf.h>
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/poll.h>
|
||||
#include <sys/domain.h>
|
||||
#include <sys/dirent.h>
|
||||
|
||||
@ -1626,6 +1627,25 @@ vcount(vp)
|
||||
return (count);
|
||||
}
|
||||
|
||||
/*
|
||||
* Return true for select/poll.
|
||||
*/
|
||||
int
|
||||
vop_nopoll(ap)
|
||||
struct vop_poll_args /* {
|
||||
struct vnode *a_vp;
|
||||
int a_events;
|
||||
struct ucred *a_cred;
|
||||
struct proc *a_p;
|
||||
} */ *ap;
|
||||
{
|
||||
|
||||
/*
|
||||
* Just return what we were asked for.
|
||||
*/
|
||||
return (ap->a_events & (POLLIN | POLLOUT | POLLRDNORM | POLLWRNORM));
|
||||
}
|
||||
|
||||
/*
|
||||
* Print out a description of a vnode.
|
||||
*/
|
||||
|
@ -36,7 +36,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)vfs_subr.c 8.31 (Berkeley) 5/26/95
|
||||
* $Id: vfs_subr.c,v 1.101 1997/09/07 16:20:46 bde Exp $
|
||||
* $Id: vfs_subr.c,v 1.102 1997/09/13 15:02:28 peter Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -54,6 +54,7 @@
|
||||
#include <sys/stat.h>
|
||||
#include <sys/buf.h>
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/poll.h>
|
||||
#include <sys/domain.h>
|
||||
#include <sys/dirent.h>
|
||||
|
||||
@ -1626,6 +1627,25 @@ vcount(vp)
|
||||
return (count);
|
||||
}
|
||||
|
||||
/*
|
||||
* Return true for select/poll.
|
||||
*/
|
||||
int
|
||||
vop_nopoll(ap)
|
||||
struct vop_poll_args /* {
|
||||
struct vnode *a_vp;
|
||||
int a_events;
|
||||
struct ucred *a_cred;
|
||||
struct proc *a_p;
|
||||
} */ *ap;
|
||||
{
|
||||
|
||||
/*
|
||||
* Just return what we were asked for.
|
||||
*/
|
||||
return (ap->a_events & (POLLIN | POLLOUT | POLLRDNORM | POLLWRNORM));
|
||||
}
|
||||
|
||||
/*
|
||||
* Print out a description of a vnode.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user