summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2007-06-05 10:48:29 +0000
committerkib <kib@FreeBSD.org>2007-06-05 10:48:29 +0000
commit46af5f9d0c1dcbef70817f8c41fa1be2dbebf6e1 (patch)
tree398c12f6ffd06eb39989f168be55fc15a618e436 /share
parenta241b1520e96c8a6725e031388df62685205417f (diff)
downloadFreeBSD-src-46af5f9d0c1dcbef70817f8c41fa1be2dbebf6e1.zip
FreeBSD-src-46af5f9d0c1dcbef70817f8c41fa1be2dbebf6e1.tar.gz
Update man page for VOP_OPEN() after fdidx->fp conversion.
Reminded by: ru
Diffstat (limited to 'share')
-rw-r--r--share/man/man9/VOP_OPENCLOSE.932
1 files changed, 16 insertions, 16 deletions
diff --git a/share/man/man9/VOP_OPENCLOSE.9 b/share/man/man9/VOP_OPENCLOSE.9
index d6f8d5d..959e095 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.
OpenPOWER on IntegriCloud