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.321
1 files changed, 17 insertions, 4 deletions
diff --git a/src/lib/libc/stdlib/realpath.3 b/src/lib/libc/stdlib/realpath.3
index c64fc3d637..fba88a6f6c 100644
--- a/src/lib/libc/stdlib/realpath.3
+++ b/src/lib/libc/stdlib/realpath.3
@@ -28,9 +28,9 @@
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.15 2007/07/06 15:42:04 millert Exp $ 31.\" $OpenBSD: realpath.3,v 1.16 2011/07/24 21:03:00 miod Exp $
32.\" 32.\"
33.Dd $Mdocdate: July 6 2007 $ 33.Dd $Mdocdate: July 24 2011 $
34.Dt REALPATH 3 34.Dt REALPATH 3
35.Os 35.Os
36.Sh NAME 36.Sh NAME
@@ -40,7 +40,7 @@
40.Fd #include <limits.h> 40.Fd #include <limits.h>
41.Fd #include <stdlib.h> 41.Fd #include <stdlib.h>
42.Ft "char *" 42.Ft "char *"
43.Fn realpath "const char *pathname" "char resolved[PATH_MAX]" 43.Fn realpath "const char *pathname" "char *resolved"
44.Sh DESCRIPTION 44.Sh DESCRIPTION
45The 45The
46.Fn realpath 46.Fn realpath
@@ -60,7 +60,8 @@ argument
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 PATH_MAX 62.Dv PATH_MAX
63characters. 63characters, or be
64.Dv NULL .
64.Pp 65.Pp
65The 66The
66.Fn realpath 67.Fn realpath
@@ -78,6 +79,13 @@ The
78function returns 79function returns
79.Fa resolved 80.Fa resolved
80on success. 81on success.
82If
83.Fa resolved
84is
85.Dv NULL
86and no error occured, then
87.Fa realpath
88returns a NUL-terminated string in a newly allocated buffer.
81If an error occurs, 89If an error occurs,
82.Fn realpath 90.Fn realpath
83returns 91returns
@@ -98,6 +106,11 @@ and
98.Sh SEE ALSO 106.Sh SEE ALSO
99.Xr readlink 1 , 107.Xr readlink 1 ,
100.Xr getcwd 3 108.Xr getcwd 3
109.Sh STANDARDS
110The
111.Fn realpath
112function conforms to
113.St -p1003.1-2008 .
101.Sh HISTORY 114.Sh HISTORY
102The 115The
103.Fn realpath 116.Fn realpath