opensolaris man page for vop_open

Query: vop_open

OS: opensolaris

Section: 9

Links: opensolaris man pages   all man pages

Forums: unix linux community   forum categories

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

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 thread *td, struct file *fp); int VOP_CLOSE(struct vnode *vp, int mode, struct ucred *cred, struct thread *td);
DESCRIPTION
The VOP_OPEN() entry point is called before a file is accessed by a process and the VOP_CLOSE() 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. td The thread which is accessing the file. fp The file being opened. Pointer to the file fp is useful for file systems which require such information, e.g., fdescfs(5). Use 'NULL' as fp argument to VOP_OPEN() for in-kernel opens. The access mode is a set of flags, including FREAD, FWRITE, O_NONBLOCK, O_APPEND.
LOCKS
VOP_OPEN() expects vp to be locked on entry and will leave it locked on return. VOP_CLOSE() 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 reference 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.
SEE ALSO
vnode(9), VOP_LOOKUP(9)
AUTHORS
This manual page was written by Doug Rabson.
BSD
June 5, 2007 BSD
Related Man Pages
vop_close(9) - debian
vop_openclose(9) - php
vop_openclose(9) - linux
vop_open(9) - linux
vop_openclose(9) - osx
Similar Topics in the Unix Linux Community
How to learn UNIX
What does this mean?
Grep the 'not running' jobs and will send the update in mail with its name(job)
Identify problem with while getopts
Solaris 10 - password complexity not working