summaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib/realpath.3
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libc/stdlib/realpath.3')
-rw-r--r--src/lib/libc/stdlib/realpath.320
1 files changed, 8 insertions, 12 deletions
diff --git a/src/lib/libc/stdlib/realpath.3 b/src/lib/libc/stdlib/realpath.3
index b8093b51e1..c178f0a9d3 100644
--- a/src/lib/libc/stdlib/realpath.3
+++ b/src/lib/libc/stdlib/realpath.3
@@ -28,7 +28,7 @@
28.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29.\" SUCH DAMAGE. 29.\" SUCH DAMAGE.
30.\" 30.\"
31.\" $OpenBSD: realpath.3,v 1.10 2003/06/02 20:18:38 millert Exp $ 31.\" $OpenBSD: realpath.3,v 1.11 2005/03/29 19:34:14 brad Exp $
32.\" 32.\"
33.Dd February 16, 1994 33.Dd February 16, 1994
34.Dt REALPATH 3 34.Dt REALPATH 3
@@ -40,7 +40,7 @@
40.Fd #include <sys/param.h> 40.Fd #include <sys/param.h>
41.Fd #include <stdlib.h> 41.Fd #include <stdlib.h>
42.Ft "char *" 42.Ft "char *"
43.Fn realpath "const char *pathname" "char resolvedname[MAXPATHLEN]" 43.Fn realpath "const char *pathname" "char resolved[PATH_MAX]"
44.Sh DESCRIPTION 44.Sh DESCRIPTION
45The 45The
46.Fn realpath 46.Fn realpath
@@ -53,13 +53,13 @@ and
53in 53in
54.Fa pathname , 54.Fa pathname ,
55and copies the resulting absolute pathname into the memory referenced by 55and copies the resulting absolute pathname into the memory referenced by
56.Fa resolvedname . 56.Fa resolved .
57The 57The
58.Fa resolvedname 58.Fa resolved
59argument 59argument
60.Em must 60.Em must
61refer to a buffer capable of storing at least 61refer to a buffer capable of storing at least
62.Dv MAXPATHLEN 62.Dv PATH_MAX
63characters. 63characters.
64.Pp 64.Pp
65The 65The
@@ -76,14 +76,14 @@ is called.
76The 76The
77.Fn realpath 77.Fn realpath
78function returns 78function returns
79.Fa resolvedname 79.Fa resolved
80on success. 80on success.
81If an error occurs, 81If an error occurs,
82.Fn realpath 82.Fn realpath
83returns 83returns
84.Dv NULL , 84.Dv NULL ,
85and 85and
86.Fa resolvedname 86.Fa resolved
87contains the pathname which caused the problem. 87contains the pathname which caused the problem.
88.Sh ERRORS 88.Sh ERRORS
89The function 89The function
@@ -91,11 +91,7 @@ The function
91may fail and set the external variable 91may fail and set the external variable
92.Va errno 92.Va errno
93for any of the errors specified for the library functions 93for any of the errors specified for the library functions
94.Xr chdir 2 ,
95.Xr close 2 ,
96.Xr fchdir 2 ,
97.Xr lstat 2 , 94.Xr lstat 2 ,
98.Xr open 2 ,
99.Xr readlink 2 , 95.Xr readlink 2 ,
100and 96and
101.Xr getcwd 3 . 97.Xr getcwd 3 .
@@ -115,6 +111,6 @@ The
115version always returns absolute pathnames, 111version always returns absolute pathnames,
116whereas the Solaris implementation will, 112whereas the Solaris implementation will,
117under certain circumstances, return a relative 113under certain circumstances, return a relative
118.Fa resolvedname 114.Fa resolved
119when given a relative 115when given a relative
120.Fa pathname . 116.Fa pathname .