summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2002-05-03 20:28:38 +0000
committerrwatson <rwatson@FreeBSD.org>2002-05-03 20:28:38 +0000
commit376c024a3befb3ee3c91481cd2422fa42c2d3b34 (patch)
treefe578b1e5fec4f7291717e0de1d5ee95620ff85e /share
parent98e4fb17a50fab6754397707b279e9747bce4868 (diff)
downloadFreeBSD-src-376c024a3befb3ee3c91481cd2422fa42c2d3b34.zip
FreeBSD-src-376c024a3befb3ee3c91481cd2422fa42c2d3b34.tar.gz
Various updates to VOP_ATTRIB(9): mention locks being shared/exclusive
for VOP_GETATTR() and VOP_SETATTR(), reference VOP_NULL() to suggest clearing all of *vap with it before setting specific values. Cross reference VFS(9). Indicate that failure modes are possible from VOP_GETATTR() and that an errno value is returned. Submitted by: Hiten Pandya <hiten@uk.FreeBSD.org>
Diffstat (limited to 'share')
-rw-r--r--share/man/man9/VOP_ATTRIB.917
1 files changed, 13 insertions, 4 deletions
diff --git a/share/man/man9/VOP_ATTRIB.9 b/share/man/man9/VOP_ATTRIB.9
index 51c80a0..a34a3b2 100644
--- a/share/man/man9/VOP_ATTRIB.9
+++ b/share/man/man9/VOP_ATTRIB.9
@@ -62,19 +62,27 @@ the thread
Attributes which are not being modified by
.Xr VOP_SETATTR 9
should be set to the value
-.Dv VNOVAL .
+.Dv VNOVAL ;
+.Fn VOP_NULL ""
+may be used to clear all the values, and should generally be used to reset
+the contents of
+.Ar *vap
+prior to setting specific values.
.Sh LOCKS
.Xr VOP_GETATTR 9
expects the vnode to be locked on entry and will leave the vnode locked on
return.
+The lock type can be either shared or exclusive.
.Pp
.Xr VOP_SETATTR 9
expects the vnode to be locked on entry and will leave the vnode locked on
return.
+The lock type must be exclusive.
.Sh RETURN VALUES
.Xr VOP_GETATTR 9
-returns information about the file in
-.Fa *vap .
+returns 0 if it was able to retrieve the attribute data via
+.Fa *vap ,
+otherwise an appropriate error is returned.
.Xr VOP_SETATTR 9
returns zero if the attributes were changed successfully, otherwise an
appropriate error is returned.
@@ -151,7 +159,8 @@ The filesystem is read-only
.El
.Sh SEE ALSO
.Xr vnode 9 ,
-.Xr VOP_ACCESS 9
+.Xr VOP_ACCESS 9 ,
+.Xr VFS 9
.Sh AUTHORS
This man page was written by
.An Doug Rabson .
OpenPOWER on IntegriCloud