VOP_OPEN man page on DragonFly

Man page or keyword search:  
man Server   44335 pages
apropos Keyword Search (all sections)
Output format
DragonFly logo
[printable version]

VOP_OPEN(9)		 BSD Kernel Developer's Manual		   VOP_OPEN(9)

NAME
     VOP_OPEN, VOP_CLOSE — open or close a file

SYNOPSIS
     #include <sys/param.h>
     #include <sys/vnode.h>

     int
     VOP_OPEN(struct vnode *vp, int mode, struct ucred *cred, struct proc *p);

     int
     VOP_CLOSE(struct vnode *vp, int mode);

DESCRIPTION
     The VOP_OPEN(9) entry point is called before a file is accessed by a
     process and the VOP_CLOSE(9) entry point is called after a file is fin‐
     ished with by the process.

     The arguments are:

     vp	   the vnode of the file

     mode  the access mode required by the calling process

     p	   the process which is accessing the file

     The access mode is a set of flags, including FREAD, FWRITE, O_NONBLOCK,
     O_APPEND.

LOCKS
     VOP_OPEN(9) expects vp to be locked on entry and will leave it locked on
     return.

     VOP_CLOSE(9) expects at least a reference to be associated with the vnode
     and does not care whether the vnode is locked or not.  The lock and ref‐
     erence state is left unchanged on return.	Note that vn_close() expects
     an unlocked, referenced vnode and will dereference the vnode prior to
     returning.

RETURN VALUES
     Zero is returned on success, otherwise an error code is returned.

PSEUDOCODE
     int
     vop_open(struct vnode *vp, int mode, struct ucred *cred, struct proc *p)
     {
	 /*
	  * Most filesystems don't do much here.
	  */
	 return 0;
     }

SEE ALSO
     vnode(9), VOP_LOOKUP(9)

AUTHORS
     This man page was written by Doug Rabson.

BSD				 July 24, 1996				   BSD
[top]

List of man pages available for DragonFly

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net