READLINK(2) — HP-UX
Series 300 Only
NAME
readlink − read value of a symbolic link
SYNOPSIS
readlink(path, buf, bufsiz)
char *path, *buf;
int bufsiz;
DESCRIPTION
Readlink obtains the path name pointed to by the symbolic link, path. This path name is placed in the buffer buf, which has size bufsiz. The path name is not null terminated when returned.
RETURN VALUE
If the call succeeds, it returns the count of characters placed in the buffer. If an error occurs, it returns a −1 and places the error code in the global variable errno.
ERRORS
Readlink will fail and the file mode will be unchanged if:
[ENOTDIR] A component of the path prefix is not a directory.
[ENAMETOOLONG]
A component of a path name exceeded MAXNAMLEN characters, or an entire path name exceeded MAXPATHLEN-1 characters.
[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 path name.
[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’ allocated address space.
AUTHOR
Readlink was developed by the University of California, Berkeley California, Computer Science Division, Department of Electrical Engineering and Computer Science.
SEE ALSO
stat(2), lstat(2), symlink(2), symlink(4).
Hewlett-Packard Company — Version B.1, May 11, 2021