| Rev | Author | # | Line |
|---|---|---|---|
| 1 | perry | 1 | !!NAME |
| 2 | PerryLorier | 2 | readlink - read value of a symbolic link |
| 1 | perry | 3 | |
| 4 | !!SYNOPSIS | ||
| 2 | PerryLorier | 5 | __#include <unistd.h>__ |
| 1 | perry | 6 | |
| 2 | PerryLorier | 7 | __int readlink(const char *__''path''__, char *__''buf''__, size_t__ ''bufsiz''__);__ |
| 1 | perry | 8 | |
| 9 | !!DESCRIPTION | ||
| 2 | PerryLorier | 10 | 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. |
| 1 | perry | 11 | |
| 12 | !!RETURN VALUE | ||
| 2 | PerryLorier | 13 | 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''. |
| 1 | perry | 14 | |
| 15 | !!ERRORS | ||
| 2 | PerryLorier | 16 | ;[ENOTDIR]: A component of the path prefix is not a directory. |
| 17 | ;[EINVAL]: ''bufsiz'' is not positive. | ||
| 18 | ;[ENAMETOOLONG]: A pathname, or a component of a pathname, was too long. | ||
| 19 | ;[ENOENT]: The named file does not exist. | ||
| 20 | ;[EACCES]: Search permission is denied for a component of the path prefix. | ||
| 21 | ;[ELOOP]: Too many symbolic links were encountered in translating the pathname. | ||
| 22 | ;[EINVAL]: The named file is not a symbolic link. | ||
| 23 | ;[EIO]: An I/O error occurred while reading from the file system. | ||
| 24 | ;[EFAULT]: ''buf'' extends outside the process's allocated address space. | ||
| 25 | ;[ENOMEM]: Insufficient kernel memory was available. | ||
| 1 | perry | 26 | |
| 27 | !!CONFORMING TO | ||
| 2 | PerryLorier | 28 | X/OPEN, 4.4BSD (the readlink(2) function call appeared in 4.2BSD). |
| 1 | perry | 29 | |
| 30 | !!SEE ALSO | ||
| 2 | PerryLorier | 31 | stat(2), lstat(2), symlink(2) |
lib/blame.php:177: Warning: Invalid argument supplied for foreach() (...repeated 7 times)