Differences between current version and revision by previous author of readlink(2).
Other diffs: Previous Major Revision, Previous Revision, or view the Annotated Edit History
Newer page: | version 2 | Last edited on Sunday, March 16, 2003 9:20:19 pm | by PerryLorier | |
Older page: | version 1 | Last edited on Tuesday, June 4, 2002 12:23:44 am | by perry | Revert |
@@ -1,116 +1,31 @@
-READLINK
-!!!READLINK
-NAME
-SYNOPSIS
-DESCRIPTION
-RETURN VALUE
-ERRORS
-CONFORMING TO
-SEE ALSO
-----
!!NAME
+readlink - read value of a symbolic link
-
-readlink - read value of a symbolic link
!!SYNOPSIS
+ __#include <unistd.h>__
+ __int readlink(const char *__''path''__, char *__''buf''__, size_t__ ''bufsiz''__);__
-__#include __
-
-
-__int readlink(const char *__''path''__, char
-*__''buf''__, size_t__
-''bufsiz''__);__
!!DESCRIPTION
+readlink(2) places the contents of the symbolic link ''path'' in the buffer ''buf'', which has size ''bufsiz''. __readlink__ does not append a __NUL__ character to ''buf''. It will truncate the contents (to a length of ''bufsiz'' characters), in case the buffer is too small to hold all of the contents.
-
-__readlink__ places the contents of the symbolic link
-''path'' in the buffer ''buf'', which has size
-''bufsiz''. __readlink__ does not append a __NUL__
-character to ''buf''. It will truncate the contents (to a
-length of ''bufsiz'' characters), in case the buffer is
-too small to hold all of the contents.
!!RETURN VALUE
+The call returns the count of characters placed in the buffer if it succeeds, or a -1 if an error occurs, placing the error code in ''errno''.
-
-The call returns the count of characters placed in the
-buffer if it succeeds, or a -1 if an error occurs, placing
-the error code in ''errno''.
!!ERRORS
+;[ENOTDIR]: A component of the path prefix is not a directory.
+;[EINVAL]: ''bufsiz'' is not positive.
+;[ENAMETOOLONG]: A pathname, or a component of a pathname, was too long.
+;[ENOENT]: The named file does not exist.
+;[EACCES]: Search permission is denied for a component of the path prefix.
+;[ELOOP]: Too many symbolic links were encountered in translating the pathname.
+;[EINVAL]: The named file is not a symbolic link.
+;[EIO]: An I/O error occurred while reading from the file system.
+;[EFAULT]: ''buf'' extends outside the process's allocated address space.
+;[ENOMEM]: Insufficient kernel memory was available.
-
-__ENOTDIR__
-
-
-A component of the path prefix is not a
-directory.
-
-
-__EINVAL__
-
-
-''bufsiz'' is not positive.
-
-
-__ENAMETOOLONG__
-
-
-A pathname, or a component of a pathname, was too
-long.
-
-
-__ENOENT__
-
-
-The named file does not exist.
-
-
-__EACCES__
-
-
-Search permission is denied for a component of the path
-prefix.
-
-
-__ELOOP__
-
-
-Too many symbolic links were encountered in translating the
-pathname.
-
-
-__EINVAL__
-
-
-The named file is not a symbolic link.
-
-
-__EIO__
-
-
-An I/O error occurred while reading from the file
-system.
-
-
-__EFAULT__
-
-
-''buf'' extends outside the process's allocated address
-space.
-
-
-__ENOMEM__
-
-
-Insufficient kernel memory was available.
!!CONFORMING TO
+X/OPEN, 4.4BSD (the readlink(2) function call appeared in 4.2BSD).
-
-X/OPEN, 4.4BSD (the __readlink__ function call appeared
-in 4.2BSD).
!!SEE ALSO
-
-
-
stat(2), lstat(2),
-
symlink(2)
-----
+stat(2), lstat(2), symlink(2)