diff options
Diffstat (limited to 'share/man/man9/VOP_OPENCLOSE.9')
-rw-r--r-- | share/man/man9/VOP_OPENCLOSE.9 | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/share/man/man9/VOP_OPENCLOSE.9 b/share/man/man9/VOP_OPENCLOSE.9 index d6f8d5dee35d..959e09599540 100644 --- a/share/man/man9/VOP_OPENCLOSE.9 +++ b/share/man/man9/VOP_OPENCLOSE.9 @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 24, 1996 +.Dd June 5, 2007 .Os .Dt VOP_OPEN 9 .Sh NAME @@ -39,7 +39,7 @@ .In sys/param.h .In sys/vnode.h .Ft int -.Fn VOP_OPEN "struct vnode *vp" "int mode" "struct ucred *cred" "struct thread *td" "int fdidx" +.Fn VOP_OPEN "struct vnode *vp" "int mode" "struct ucred *cred" "struct thread *td" "struct file *fp" .Ft int .Fn VOP_CLOSE "struct vnode *vp" "int mode" "struct ucred *cred" "struct thread *td" .Sh DESCRIPTION @@ -57,14 +57,21 @@ The vnode of the file. The access mode required by the calling process. .It Fa td The thread which is accessing the file. +.It Fa fp +The file being opened. .El .Pp -Additionally, -.Fn VOP_OPEN -can accept a file descriptor number in -.Fa fdidx ; -this is useful for file systems which require such information, e.g., +Pointer to the file +.Fa fp +is useful for file systems which require such information, e.g., .Xr fdescfs 5 . +Use +.Ql NULL +as +.Fa fp +argument to +.Fn VOP_OPEN +for in-kernel opens. .Pp The access mode is a set of flags, including .Dv FREAD , @@ -85,20 +92,13 @@ Note that .Fa vn_close expects an unlocked, referenced vnode and will dereference the vnode prior to returning. -.Sh IMPLEMENTATION NOTES -The -.Fa fdidx -argument to -.Fn VOP_OPEN -is currently unused, use -.Ql \-1 -for the meantime; however, this will change in future. .Sh RETURN VALUES Zero is returned on success, otherwise an error code is returned. .Sh PSEUDOCODE .Bd -literal int -vop_open(struct vnode *vp, int mode, struct ucred *cred, struct thread *td) +vop_open(struct vnode *vp, int mode, struct ucred *cred, struct thread *td, + struct file *fp) { /* * Most file systems don't do much here. |