source: trunk/minix/man/man2/readlink.2@ 15

Last change on this file since 15 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

File size: 1.2 KB
Line 
1.TH READLINK 2 "March 17, 2006"
2.UC 4
3.SH NAME
4readlink \- read the contents of a symlink
5.SH SYNOPSIS
6.nf
7.ft B
8#include <unistd.h>
9
10int readlink(const char *\fIpath\fP, char *\fIbuf\fP, size_t bufsize)
11.fi
12.ft R
13.SH DESCRIPTION
14The
15.I readlink
16call reads the contents of the symlink
17.I name1
18and returns it in
19.I buf
20up to a maximum of
21.I bufsize
22bytes. A terminating NUL byte is NOT put in the buffer.
23.SH "RETURN VALUE
24Upon successful completion, a value of 0 is returned. Otherwise,
25a value of \-1 is returned and
26.B errno
27is set to indicate the error.
28.SH "ERRORS
29.B Readlink
30will fail if one or more of the following are true:
31.TP 15
32[ENOTDIR]
33A component of either path prefix is not a directory.
34.TP 15
35[ENAMETOOLONG]
36A path name exceeds PATH_MAX characters.
37.TP 15
38[ENOENT]
39A component of the path does not exist.
40.TP 15
41[EACCES]
42A component of the path denies search permission.
43.TP 15
44[ELOOP]
45Too many symbolic links were encountered in translating one of the pathnames.
46.TP 15
47[ENOENT]
48The link named by \fIpath\fP does not exist.
49.TP 15
50[EFAULT]
51The buffer specified is outside the process's allocated address space.
52.SH "SEE ALSO"
53.BR symlink (2),
54.BR unlink (2).
Note: See TracBrowser for help on using the repository browser.