summaryrefslogtreecommitdiff
path: root/lib/libc/sys
diff options
context:
space:
mode:
authorwiz <wiz@NetBSD.org>2012-12-01 20:50:19 +0000
committerwiz <wiz@NetBSD.org>2012-12-01 20:50:19 +0000
commit81aee2325bc42256c1ece38ca4281bb608ea9ff5 (patch)
tree4008d4ef8b40e29e04f5f90cac268ca7f9ea6403 /lib/libc/sys
parenta5fd70d510c571abbe417c6ad43eeaf1a1174259 (diff)
Bump date. New sentence, new line. Wording/articles.
While here, sort errors.
Diffstat (limited to 'lib/libc/sys')
-rw-r--r--lib/libc/sys/readlink.239
1 files changed, 20 insertions, 19 deletions
diff --git a/lib/libc/sys/readlink.2 b/lib/libc/sys/readlink.2
index 1f731e89370..203805fca8d 100644
--- a/lib/libc/sys/readlink.2
+++ b/lib/libc/sys/readlink.2
@@ -1,4 +1,4 @@
-.\" $NetBSD: readlink.2,v 1.28 2012/12/01 20:45:01 wiz Exp $
+.\" $NetBSD: readlink.2,v 1.29 2012/12/01 20:50:19 wiz Exp $
.\"
.\" Copyright (c) 1983, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -29,7 +29,7 @@
.\"
.\" @(#)readlink.2 8.1 (Berkeley) 6/4/93
.\"
-.Dd May 11, 2004
+.Dd November 18, 2012
.Dt READLINK 2
.Os
.Sh NAME
@@ -64,18 +64,19 @@ works the same way as
.Fn readlink
except if
.Fa path
-is relative. In that case, it is looked up from a directory whose file
+is relative.
+In that case, it is looked up from a directory whose file
descriptor was passed as
.Fa fd .
Search permission is required on
.Fa fd
-except if that file descriptor was open with
+except if that file descriptor was opened with the
.Dv O_SEARCH
-option.
+flag.
.Fa fd
can be set to
.Dv AT_FDCWD
-in order to specify current directory.
+in order to specify the current directory.
.Sh RETURN VALUES
The call returns the count of characters placed in the buffer
if it succeeds, or a \-1 if an error occurs, placing the error
@@ -101,8 +102,17 @@ buf[len] = '\e0';
.Fn readlink
will fail if:
.Bl -tag -width Er
-.It Bq Er ENOTDIR
-A component of the path prefix is not a directory.
+.It Bq Er EACCES
+Search permission is denied for a component of the path prefix.
+.It Bq Er EFAULT
+.Fa buf
+extends outside the process's allocated address space.
+.It Bq Er EINVAL
+The named file is not a symbolic link.
+.It Bq Er EIO
+An I/O error occurred while reading from the file system.
+.It Bq Er ELOOP
+Too many symbolic links were encountered in translating the pathname.
.It Bq Er ENAMETOOLONG
A component of a pathname exceeded
.Brq Dv NAME_MAX
@@ -111,17 +121,8 @@ characters, or an entire path name exceeded
characters.
.It Bq Er ENOENT
The named file does not exist.
-.It Bq Er EACCES
-Search permission is denied for a component of the path prefix.
-.It Bq Er ELOOP
-Too many symbolic links were encountered in translating the pathname.
-.It Bq Er EINVAL
-The named file is not a symbolic link.
-.It Bq Er EIO
-An I/O error occurred while reading from the file system.
-.It Bq Er EFAULT
-.Fa buf
-extends outside the process's allocated address space.
+.It Bq Er ENOTDIR
+A component of the path prefix is not a directory.
.El
.Sh SEE ALSO
.Xr lstat 2 ,