.TH READLINK 2 .UC 4 .SH NAME readlink \- read value of link .SH SYNOPSIS .nf .B #include .B int readlink (const char *path, char *buf, int len); .fi .SH DESCRIPTION .B readlink() reads up to .I len characters of the link named by .I *path, into .I buf. 0 is returned on success, and a negative value on failure. This is one of the VFS operations. .SH ERRORS .B -EINVAL is returned if .I len is negative, the .B readlink operation is not supported for a given file system, or .I path is not a link. .PP .B -ENOENT is returned if .I path does not exist. .SH FILES linux/fs/stat.c .br linux/fs/minix/namei.c .br /usr/include/linux/sys.h .br /usr/include/unistd.h .SH SEE ALSO stat(2) .SH BUGS A user can read links in directories they don't have permissions for if they know the names. .PP A maximum of 1023 charcters is read by the .B minix_readlink() function. .PP No terminating \\0 is appended to the string.