READLINK(2)

NAME
readlink - read value of link

SYNOPSIS
#include <unistd.h>
int readlink (const char *path, char *buf, int len);

DESCRIPTION
readlink() reads up to len characters of the link named by *path, into buf. 0 is returned on success, and a negative value on failure. This is one of the VFS operations.

ERRORS
-EINVAL is returned if len is negative, the readlink operation is not supported for a given file system, or path is not a link.

-ENOENT is returned if path does not exist.

FILES
linux/fs/stat.c
linux/fs/minix/namei.c
/usr/include/linux/sys.h
/usr/include/unistd.h

SEE ALSO
stat(2)

BUGS
A user can read links in directories they don't have permissions for if they know the names.

A maximum of 1023 charcters is read by the minix_readlink() function.

No terminating \0 is appended to the string.