|
|
1.1 ! root 1: .\" Copyright (c) 1983 Regents of the University of California. ! 2: .\" All rights reserved. The Berkeley software License Agreement ! 3: .\" specifies the terms and conditions for redistribution. ! 4: .\" ! 5: .\" @(#)readlink.2 6.4 (Berkeley) 8/26/85 ! 6: .\" ! 7: .TH READLINK 2 "August 26, 1985" ! 8: .UC 5 ! 9: .SH NAME ! 10: readlink \- read value of a symbolic link ! 11: .SH SYNOPSIS ! 12: .nf ! 13: .ft B ! 14: cc = readlink(path, buf, bufsiz) ! 15: int cc; ! 16: char *path, *buf; ! 17: int bufsiz; ! 18: .fi ! 19: .ft R ! 20: .SH DESCRIPTION ! 21: .I Readlink ! 22: places the contents of the symbolic link ! 23: .I name ! 24: in the buffer ! 25: .I buf, ! 26: which has size ! 27: .IR bufsiz . ! 28: The contents of the link are not null terminated when returned. ! 29: .SH "RETURN VALUE ! 30: The call returns the count of characters placed in the buffer ! 31: if it succeeds, or a \-1 if an error occurs, placing the error ! 32: code in the global variable \fIerrno\fP. ! 33: .SH "ERRORS ! 34: .I Readlink ! 35: will fail and the file mode will be unchanged if: ! 36: .TP 15 ! 37: [ENOTDIR] ! 38: A component of the path prefix is not a directory. ! 39: .TP 15 ! 40: [EINVAL] ! 41: The pathname contains a character with the high-order bit set. ! 42: .TP 15 ! 43: [ENAMETOOLONG] ! 44: A component of a pathname exceeded 255 characters, ! 45: or an entire path name exceeded 1023 characters. ! 46: .TP 15 ! 47: [ENOENT] ! 48: The named file does not exist. ! 49: .TP 15 ! 50: [EACCES] ! 51: Search permission is denied for a component of the path prefix. ! 52: .TP 15 ! 53: [ELOOP] ! 54: Too many symbolic links were encountered in translating the pathname. ! 55: .TP 15 ! 56: [EINVAL] ! 57: The named file is not a symbolic link. ! 58: .TP 15 ! 59: [EIO] ! 60: An I/O error occurred while reading from the file system. ! 61: .TP 15 ! 62: [EFAULT] ! 63: .I Buf ! 64: extends outside the process's allocated address space. ! 65: .SH SEE ALSO ! 66: 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.