summaryrefslogtreecommitdiffstats
path: root/share/man
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2010-01-14 14:36:39 +0000
committerjhb <jhb@FreeBSD.org>2010-01-14 14:36:39 +0000
commit8019b29e4fefc8bd6d9bd41bf2b23c45665c695b (patch)
treecc97235fea2a61e78bd77872018cce22be4f7fe5 /share/man
parent8ab7715033ec4b66ff6203f772f2a4b430e2b6e6 (diff)
downloadFreeBSD-src-8019b29e4fefc8bd6d9bd41bf2b23c45665c695b.zip
FreeBSD-src-8019b29e4fefc8bd6d9bd41bf2b23c45665c695b.tar.gz
- Update required headers for namei() to add <sys/fcntl.h> and remove
<sys/proc.h>. - Add RETURN VALUES and ERROR sections for namei()'s error return values. - Add a missing link to NDHASGIANT.9. PR: docs/142815, docs/142816 Submitted by: Lachlan Kang (1, 2) MFC after: 3 days
Diffstat (limited to 'share/man')
-rw-r--r--share/man/man9/Makefile3
-rw-r--r--share/man/man9/namei.930
2 files changed, 31 insertions, 2 deletions
diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile
index df049f5..969790a 100644
--- a/share/man/man9/Makefile
+++ b/share/man/man9/Makefile
@@ -903,7 +903,8 @@ MLINKS+=mutex.9 mtx_assert.9 \
mutex.9 mtx_unlock_spin.9 \
mutex.9 mtx_unlock_spin_flags.9
MLINKS+=namei.9 NDFREE.9 \
- namei.9 NDINIT.9
+ namei.9 NDINIT.9 \
+ namei.9 NDHASGIANT.9
MLINKS+=pbuf.9 getpbuf.9 \
pbuf.9 relpbuf.9 \
pbuf.9 trypbuf.9
diff --git a/share/man/man9/namei.9 b/share/man/man9/namei.9
index 1951665..1ffabff 100644
--- a/share/man/man9/namei.9
+++ b/share/man/man9/namei.9
@@ -44,7 +44,7 @@
.Nd pathname translation and lookup operations
.Sh SYNOPSIS
.In sys/param.h
-.In sys/proc.h
+.In sys/fcntl.h
.In sys/namei.h
.Ft int
.Fn namei "struct nameidata *ndp"
@@ -315,6 +315,34 @@ flag can be passed to the
.Fn NDFREE
function.
.El
+.Sh RETURN VALUES
+If successful,
+.Fn namei
+will return 0, otherwise it will return an error.
+.Sh ERRORS
+Errors which
+.Fn namei
+may return:
+.Bl -tag -width Er
+.It Bq Er ENOTDIR
+A component of the specified pathname is not a directory when a directory is
+expected.
+.It Bq Er ENAMETOOLONG
+A component of a pathname exceeded 255 characters,
+or an entire pathname exceeded 1023 characters.
+.It Bq Er ENOENT
+A component of the specified pathname does not exist,
+or the pathname is an empty string.
+.It Bq Er ACCES
+An attempt is made to access a file in a way forbidden by its file access
+permissions.
+.It Bq Er ELOOP
+Too many symbolic links were encountered in translating the pathname.
+.It Bq Er EISDIR
+An attempt is made to open a directory with write mode specified.
+.It Bq Er EROFS
+An attempt is made to modify a file or directory on a read-only file system.
+.El
.Sh FILES
.Bl -tag
.It Pa src/sys/kern/vfs_lookup.c
OpenPOWER on IntegriCloud