BSD 4_3_Tahoe development
[unix-history] / usr / man / cat2 / readlink.0
CommitLineData
2cf6fecc
C
1
2
3
4READLINK(2) UNIX Programmer's Manual READLINK(2)
5
6
7
8N\bNA\bAM\bME\bE
9 readlink - read value of a symbolic link
10
11S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
12 c\bcc\bc =\b= r\bre\bea\bad\bdl\bli\bin\bnk\bk(\b(p\bpa\bat\bth\bh,\b, b\bbu\buf\bf,\b, b\bbu\buf\bfs\bsi\biz\bz)\b)
13 i\bin\bnt\bt c\bcc\bc;\b;
14 c\bch\bha\bar\br *\b*p\bpa\bat\bth\bh,\b, *\b*b\bbu\buf\bf;\b;
15 i\bin\bnt\bt b\bbu\buf\bfs\bsi\biz\bz;\b;
16
17D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
18 _\bR_\be_\ba_\bd_\bl_\bi_\bn_\bk places the contents of the symbolic link _\bn_\ba_\bm_\be in
19 the buffer _\bb_\bu_\bf, which has size _\bb_\bu_\bf_\bs_\bi_\bz. The contents of the
20 link are not null terminated when returned.
21
22R\bRE\bET\bTU\bUR\bRN\bN V\bVA\bAL\bLU\bUE\bE
23 The call returns the count of characters placed in the
24 buffer if it succeeds, or a -1 if an error occurs, placing
25 the error code in the global variable _\be_\br_\br_\bn_\bo.
26
27E\bER\bRR\bRO\bOR\bRS\bS
28 _\bR_\be_\ba_\bd_\bl_\bi_\bn_\bk will fail and the file mode will be unchanged if:
29
30 [ENOTDIR] A component of the path prefix is not a
31 directory.
32
33 [EINVAL] The pathname contains a character with the
34 high-order bit set.
35
36 [ENAMETOOLONG] A component of a pathname exceeded 255 char-
37 acters, or an entire path name exceeded 1023
38 characters.
39
40 [ENOENT] The named file does not exist.
41
42 [EACCES] Search permission is denied for a component
43 of the path prefix.
44
45 [ELOOP] Too many symbolic links were encountered in
46 translating the pathname.
47
48 [EINVAL] The named file is not a symbolic link.
49
50 [EIO] An I/O error occurred while reading from the
51 file system.
52
53 [EFAULT] _\bB_\bu_\bf extends outside the process's allocated
54 address space.
55
56S\bSE\bEE\bE A\bAL\bLS\bSO\bO
57 stat(2), lstat(2), symlink(2)
58
59
60
61
62
63Printed 7/9/88 August 26, 1985 1
64
65
66