|
|
1.1 ! root 1: .TH READLINK 2 "2 July 1983" ! 2: .UC 4 ! 3: .SH NAME ! 4: readlink \- read value of a symbolic link ! 5: .SH SYNOPSIS ! 6: .nf ! 7: .ft B ! 8: cc = readlink(path, buf, bufsiz) ! 9: int cc; ! 10: char *path, *buf; ! 11: int bufsiz; ! 12: .fi ! 13: .ft R ! 14: .SH DESCRIPTION ! 15: .I Readlink ! 16: places the contents of the symbolic link ! 17: .I name ! 18: in the buffer ! 19: .I buf ! 20: which has size ! 21: .IR bufsiz . ! 22: The contents of the link are not null terminated when returned. ! 23: .SH "RETURN VALUE ! 24: The call returns the count of characters placed in the buffer ! 25: if it succeeds, or a \-1 if an error occurs, placing the error ! 26: code in the global variable \fIerrno\fP. ! 27: .SH "ERRORS ! 28: .I Readlink ! 29: will fail and the file mode will be unchanged if: ! 30: .TP 15 ! 31: [EPERM] ! 32: The \fIpath\fP argument contained a byte with the high-order bit set. ! 33: .TP 15 ! 34: [ENOENT] ! 35: The pathname was too long. ! 36: .TP 15 ! 37: [ENOTDIR] ! 38: A component of the path prefix is not a directory. ! 39: .TP 15 ! 40: [ENOENT] ! 41: The named file does not exist. ! 42: .TP 15 ! 43: [ENXIO] ! 44: The named file is not a symbolic link. ! 45: .TP 15 ! 46: [EACCES] ! 47: Search permission is denied on a component of the path prefix. ! 48: .TP 15 ! 49: [EPERM] ! 50: The effective user ID does not match the owner of the file and ! 51: the effective user ID is not the super-user. ! 52: .TP 15 ! 53: [EINVAL] ! 54: The named file is not a symbolic link. ! 55: .TP 15 ! 56: [EFAULT] ! 57: .I Buf ! 58: extends outside the process's allocated address space. ! 59: .TP 15 ! 60: [ELOOP] ! 61: Too many symbolic links were encountered in translating the pathname. ! 62: .SH SEE ALSO ! 63: stat(2), lstat(2), symlink(2)
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.