NAME | SYNOPSIS | API RESTRICTIONS | FEATURES | DESCRIPTION | RETURN VALUES | ERRORS | ATTRIBUTES | SEE ALSO
#include <unistd.h>int readlink(const char *path, char *buf, int bufsiz);
The function or functions documented here may not be used safely in all application contexts with all APIs provided in the ChorusOS 5.0 product.
See API(5FEA) for details.
MSDOSFS, NFS_CLIENT, UFS
The readlink system call places the contents of the symbolic link path in the buffer buf, which has the size bufsiz. The readlink system call does not append a NULL character to buf.
If successful, the call returns the count of characters placed in the buffer, otherwise, it returns a value of -1 and sets errno to indicate one of the following error conditions.
A component of the path prefix is not a directory.
A component of a pathname exceeded NAME_MAX characters, or an entire pathname exceeded PATH_MAX characters.
The file referred to by path does not exist.
Search permission is denied for a component of the path prefix.
Too many symbolic links were encountered in translating the pathname.
The file named is not a symbolic link.
An I/O error occurred while reading from the file system.
In user mode, buf extends outside the process' allocated address space. In supervisor mode, this is not detected and the state of the target is unknown.
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
---|---|
Interface Stability | Evolving |
NAME | SYNOPSIS | API RESTRICTIONS | FEATURES | DESCRIPTION | RETURN VALUES | ERRORS | ATTRIBUTES | SEE ALSO