diff options
author | ru <ru@FreeBSD.org> | 2003-06-02 15:02:06 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2003-06-02 15:02:06 +0000 |
commit | 29f96439114d622208dd85a833e0929e1310b66a (patch) | |
tree | 4a56090fec39317e942be1d49dd392fac4bed632 /share/man/man9/namei.9 | |
parent | 2550ebdaa67be2186e18324278575cf49f6e9804 (diff) | |
download | FreeBSD-src-29f96439114d622208dd85a833e0929e1310b66a.zip FreeBSD-src-29f96439114d622208dd85a833e0929e1310b66a.tar.gz |
Assorted mdoc(7) fixes.
Diffstat (limited to 'share/man/man9/namei.9')
-rw-r--r-- | share/man/man9/namei.9 | 68 |
1 files changed, 37 insertions, 31 deletions
diff --git a/share/man/man9/namei.9 b/share/man/man9/namei.9 index 2556d9f..72ad4d1 100644 --- a/share/man/man9/namei.9 +++ b/share/man/man9/namei.9 @@ -1,6 +1,6 @@ .\" .\" Copyright (c) 1998, 1999 Eivind Eklund -.\" Copyright (c) 2003, Hiten M. Pandya +.\" Copyright (c) 2003 Hiten M. Pandya .\" .\" All rights reserved. .\" @@ -47,7 +47,10 @@ .Ft int .Fn namei "struct nameidata *ndp" .Ft void -.Fn NDINIT "struct nameidata *ndp" "u_long op" "u_long flags" "enum uio_seg segflg" "const char *namep" "struct thread *td" +.Fo NDINIT +.Fa "struct nameidata *ndp" "u_long op" "u_long flags" +.Fa "enum uio_seg segflg" "const char *namep" "struct thread *td" +.Fc .Ft void .Fn NDFREE "struct nameidata *ndp" "const uint flags" .Sh DESCRIPTION @@ -63,9 +66,9 @@ using either .Xr vrele 9 or .Xr vput 9 , -depending on whether you specified the +depending on whether the .Dv LOCKLEAF -flag or not. +flag was specified or not. .Pp The .Fn NDINIT @@ -73,8 +76,7 @@ function is used to initialize .Nm components. It takes the following arguments: -.Pp -.Bl -tag -width segflg +.Bl -tag -width ".Fa segflg" .It Fa ndp The .Vt "struct nameidata" @@ -84,9 +86,7 @@ The operation which .Fn namei will perform. The following operations are valid: -.Dv LOOKUP , -.Dv CREATE , -.Dv DELETE , +.Dv LOOKUP , CREATE , DELETE , and .Dv RENAME . The latter three are just setup for those @@ -106,7 +106,7 @@ or in the kernel address space .Pq Dv UIO_SYSSPACE . .It Fa namep Pointer to the component's pathname buffer -.Pq the file or directory name that will be looked up . +(the file or directory name that will be looked up). .It Fa td The thread context to use for .Nm @@ -116,16 +116,19 @@ operations and locks. The .Fn namei function takes the following set of -.Dq operation flags +.Dq "operation flags" that influence its operation: -.Bl -tag -width WANTPARENT +.Bl -tag -width ".Dv WANTPARENT" .It Dv LOCKLEAF Lock vnode on return. -This is a full lock of the vnode; you'll have to use +This is a full lock of the vnode; the .Xr VOP_UNLOCK 9 -to release the lock (or use +should be used +to release the lock (or .Xr vput 9 -to release the lock and do a +which is equivalent to calling +.Xr VOP_UNLOCK 9 +followed by .Xr vrele 9 , all in one). .It Dv LOCKPARENT @@ -138,7 +141,7 @@ in locked state, unless it is identical to in which case .Va ni_dvp is not locked per se (but may be locked due to -.Dv LOCKLEAF ). +.Dv LOCKLEAF ) . If a lock is enforced, it should be released using .Xr vput 9 or @@ -155,10 +158,11 @@ The parent vnode must be released separately by using Avoid .Fn namei creating this entry in the namecache if it is not -already present. Normally +already present. +Normally, .Fn namei will add entries to the name cache -if they're not already there. +if they are not already there. .It Dv FOLLOW With this flag, .Fn namei @@ -179,7 +183,7 @@ are intentionally not followed. .It Dv SAVENAME Do not free the pathname buffer at the end of the .Fn namei -invocation, instead free it later in +invocation; instead, free it later in .Fn NDFREE so that the caller may access the pathname buffer. See below for details. @@ -192,10 +196,11 @@ See below for details. The .Vt nameidata structure is composed of the following fields: -.Bl -tag -width ni_cnd.cn_pnbuf +.Bl -tag -width ".Va ni_cnd.cn_pnbuf" .It Va ni_startdir In the normal case, this is either the current directory or the root. -It is the current directory if the name passed in doesn't start with / +It is the current directory if the name passed in does not start with +.Ql / and we have not gone through any symlinks with an absolute path, and the root otherwise. .Pp @@ -228,10 +233,9 @@ It is locked if .Dv LOCKPARENT is set. Freeing this in -.Dv NDFREE +.Fn NDFREE can be inhibited by -.Dv NDF_NO_DVP_RELE , -.Dv NDF_NO_DVP_PUT , +.Dv NDF_NO_DVP_RELE , NDF_NO_DVP_PUT , or .Dv NDF_NO_DVP_UNLOCK (with the obvious effects). @@ -249,11 +253,10 @@ is set, it is also locked. Freeing this in .Fn NDFREE can be inhibited by -.Dv NDF_NO_VP_RELE , -.Dv NDF_NO_VP_PUT , +.Dv NDF_NO_VP_RELE , NDF_NO_VP_PUT , or .Dv NDF_NO_VP_UNLOCK -.Pq with the obvious effects . +(with the obvious effects). .It Va ni_cnd.cn_pnbuf The pathname buffer contains the location of the file or directory that will be used by the @@ -268,7 +271,7 @@ or .Dv SAVENAME flag is set, then the pathname buffer is available after calling the -.Nm namei +.Fn namei function. .Pp To only deallocate resources used by the pathname buffer, @@ -286,7 +289,9 @@ flag can be passed to the function. .El .Sh FILES -.Pa src/sys/kern/vfs_lookup.c +.Bl -tag +.It Pa src/sys/kern/vfs_lookup.c +.El .Sh SEE ALSO .Xr uio 9 , .Xr uma 9 , @@ -295,10 +300,11 @@ function. .Xr vput 9 , .Xr vref 9 .Sh AUTHORS +.An -nosplit This manual page was written by -.An Eivind Eklund Aq eivind@FreeBSD.ORG +.An Eivind Eklund Aq eivind@FreeBSD.org and later significantly revised by -.An Hiten M. Pandya Aq hmp@FreeBSD.ORG . +.An Hiten M. Pandya Aq hmp@FreeBSD.org . .Sh BUGS The .Dv LOCKPARENT |