summaryrefslogtreecommitdiffstats
path: root/share/man/man9/namei.9
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2000-12-29 09:18:45 +0000
committerru <ru@FreeBSD.org>2000-12-29 09:18:45 +0000
commit17ba2140980343f6298e96bd96d2e0c16b9dfb46 (patch)
treefa86ee6469463baf5401eb48b33f4451db7b2f20 /share/man/man9/namei.9
parent42aaa8ad04e1e8eb1058cea549112273857df290 (diff)
downloadFreeBSD-src-17ba2140980343f6298e96bd96d2e0c16b9dfb46.zip
FreeBSD-src-17ba2140980343f6298e96bd96d2e0c16b9dfb46.tar.gz
Prepare for mdoc(7)NG.
Diffstat (limited to 'share/man/man9/namei.9')
-rw-r--r--share/man/man9/namei.915
1 files changed, 6 insertions, 9 deletions
diff --git a/share/man/man9/namei.9 b/share/man/man9/namei.9
index 5063ee1..8fc5954 100644
--- a/share/man/man9/namei.9
+++ b/share/man/man9/namei.9
@@ -47,9 +47,7 @@
.Ft void
.Fn NDINIT "struct nameidata *ndp" "int operation" "int operflags" "int segflag" "const char *path" "struct proc *proc"
.Fn NDFREE "struct nameidata *ndp" "int operflags"
-
.Sh DESCRIPTION
-
.Fn namei
is used to get from a pathname to a vnode for the object.
This is a necessity to start doing VFS operations. The vnode
@@ -160,16 +158,15 @@ 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 /
and we have not gone through any symlinks with an absolute path, and
the root otherwise.
-
+.Pp
In this case, it is is only used by lookup(), and should not be
considered valid after a call to namei().
-
+.Pp
If SAVESTART is set, this is set to the same as ni_dvp, with an extra
VREF().
-
+.Pp
To block NDFREE from releasing ni_startdir when it is set, use the
flag NDF_NO_STARTDIR_RELE.
-
.It Dv ni_dvp
The directory vp for the directory the object we're looking up is in.
This is available on successful return if LOCKPARENT or WANTPARENT is
@@ -180,19 +177,19 @@ be inhibited by NDF_NO_DVP_RELE, NDF_NO_DVP_PUT, or NDF_NO_DVP_UNLOCK
The vp for the target of the of the pathname exists, NULL otherwise.
The vp is returned with increased reference count (VREF'ed). If
LOCKLEAF is set, it is also locked.
-
+.Pp
Freeing this in NDFREE can be inhibited by NDF_NO_VP_RELE,
NDF_NO_VP_PUT, or NDF_NO_VP_UNLOCK (with the obvious effects).
-
.It Dv ni_cnd.cn_pnbuf
Path name buffer. This is allocated through zalloc(namei_zone)
and freed through zfree(namei_zone, ...).
-
+.Pp
This is available to the caller (who must free it using
.Xr NDFREE 9 )
if SAVESTART or SAVENAME is set.
To free only the ni_cnd.cn_pnbuf, there is a special flags NDF_ONLY_PNBUF.
To not free the cnd, use the flag ND_NO_FREE_PNBUF.
+.El
.Sh BUGS
LOCKPARENT does not always result in parent vp being locked (see details in
description).
OpenPOWER on IntegriCloud