aboutsummaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2007-06-05 10:48:29 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2007-06-05 10:48:29 +0000
commite3e7f469a0318b8ca43da395ddb5aad5b54797e9 (patch)
tree398c12f6ffd06eb39989f168be55fc15a618e436 /share
parent0dee40cc688e8af4643a9376a361c6cb926c6cfe (diff)
downloadsrc-e3e7f469a0318b8ca43da395ddb5aad5b54797e9.tar.gz
src-e3e7f469a0318b8ca43da395ddb5aad5b54797e9.zip
Update man page for VOP_OPEN() after fdidx->fp conversion.
Reminded by: ru
Notes
Notes: svn path=/head/; revision=170323
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 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.