From d6d133bf05c01c6cf03f8551c9ff8e9835c03785 Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Sun, 1 Aug 2010 09:26:04 +0200 Subject: [PATCH] nlookup.9: Document nlookup_init_at() and nlookup_done_at(). --- share/man/man9/Makefile | 2 ++ share/man/man9/nlookup.9 | 38 +++++++++++++++++++++++++++++++++++--- 2 files changed, 37 insertions(+), 3 deletions(-) diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index 98ed3a6210..03dd883ef0 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -611,7 +611,9 @@ MLINKS+=mutex.9 mtx_downgrade.9 \ MLINKS+=nlookup.9 naccess.9 \ nlookup.9 naccess_va.9 \ nlookup.9 nlookup_done.9 \ + nlookup.9 nlookup_done_at.9 \ nlookup.9 nlookup_init.9 \ + nlookup.9 nlookup_init_at.9 \ nlookup.9 nlookup_init_raw.9 \ nlookup.9 nlookup_init_root.9 \ nlookup.9 nlookup_mp.9 \ diff --git a/share/man/man9/nlookup.9 b/share/man/man9/nlookup.9 index 106a831ce5..14ed64f429 100644 --- a/share/man/man9/nlookup.9 +++ b/share/man/man9/nlookup.9 @@ -28,19 +28,19 @@ .\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $DragonFly: src/share/man/man9/nlookup.9,v 1.11 2008/02/09 09:45:03 swildner Exp $ -.\" -.Dd March 14, 2010 +.Dd August 1, 2010 .Os .Dt NLOOKUP 9 .Sh NAME .Nm nlookup , .Nm nlookup_init , +.Nm nlookup_init_at , .Nm nlookup_init_raw , .Nm nlookup_init_root , .Nm nlookup_set_cred , .Nm nlookup_zero , .Nm nlookup_done , +.Nm nlookup_done_at , .Nm nlookup_simple , .Nm nlookup_mp , .Nm nreadsymlink , @@ -55,6 +55,8 @@ .Ft int .Fn nlookup_init "struct nlookupdata *nd" "const char *path" "enum uio_seg seg" "int flags" .Ft int +.Fn nlookup_init_at "struct nlookupdata *nd" "struct file **fpp" "int fd" "const char *path" "enum uio_seg seg" "int flags" +.Ft int .Fn nlookup_init_raw "struct nlookupdata *nd" "const char *path" "enum uio_seg seg" "int flags" "struct ucred *cred" "struct namecache *ncstart" .Ft int .Fn nlookup_init_root "struct nlookupdata *nd" "const char *path" "enum uio_seg seg" "int flags" "struct ucred *cred" "struct namecache *ncstart" "struct namecache *ncroot" @@ -64,6 +66,8 @@ .Fn nlookup_zero "struct nlookupdata *nd" .Ft void .Fn nlookup_done "struct nlookupdata *nd" +.Ft void +.Fn nlookup_done_at "struct nlookupdata *nd" "struct file *fp" .Ft "struct namecache *" .Fn nlookup_simple "const char *str" "enum uio_seg seg" "int niflags" "int *error" .Ft int @@ -113,6 +117,26 @@ The first process proc0's credentials are used if the calling thread is not associated with a process context. .Pp +.Fn nlookup_init_at +is similar to +.Fn nlookup_init +except that when +.Fa path +is a relative path and +.Fa fd +is not +.Dv AT_FDCWD , +.Fa path +is interpreted relative to the directory associated with +.Fa fd +and the file entry for +.Fa fd +is referenced and returned in +.Fa *fpp . +Its main use is the implementation of +.Fn *at +system calls. +.Pp .Fn nlookup_init_raw works similarly to .Fn nlookup_init @@ -156,6 +180,14 @@ have taken all dynamic elements out of the .Fa nlookupdata structure. .Pp +.Fn nlookup_done_at +cleans up an +.Fa nlookupdata +structure that was initialized with +.Fn nlookup_init_at +and drops the reference to +.Fa fp . +.Pp .Fn nlookup_simple is a simple all-in-one .Fn nlookup . -- 2.41.0