Update man page for VOP_OPEN() after fdidx->fp conversion.
Reminded by: ru
This commit is contained in:
parent
a241b1520e
commit
46af5f9d0c
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user