diff options
Diffstat (limited to 'src/lib/libc/stdlib/realpath.3')
-rw-r--r-- | src/lib/libc/stdlib/realpath.3 | 21 |
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 |
45 | The | 45 | The |
46 | .Fn realpath | 46 | .Fn realpath |
@@ -60,7 +60,8 @@ argument | |||
60 | .Em must | 60 | .Em must |
61 | refer to a buffer capable of storing at least | 61 | refer to a buffer capable of storing at least |
62 | .Dv PATH_MAX | 62 | .Dv PATH_MAX |
63 | characters. | 63 | characters, or be |
64 | .Dv NULL . | ||
64 | .Pp | 65 | .Pp |
65 | The | 66 | The |
66 | .Fn realpath | 67 | .Fn realpath |
@@ -78,6 +79,13 @@ The | |||
78 | function returns | 79 | function returns |
79 | .Fa resolved | 80 | .Fa resolved |
80 | on success. | 81 | on success. |
82 | If | ||
83 | .Fa resolved | ||
84 | is | ||
85 | .Dv NULL | ||
86 | and no error occured, then | ||
87 | .Fa realpath | ||
88 | returns a NUL-terminated string in a newly allocated buffer. | ||
81 | If an error occurs, | 89 | If an error occurs, |
82 | .Fn realpath | 90 | .Fn realpath |
83 | returns | 91 | returns |
@@ -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 | ||
110 | The | ||
111 | .Fn realpath | ||
112 | function conforms to | ||
113 | .St -p1003.1-2008 . | ||
101 | .Sh HISTORY | 114 | .Sh HISTORY |
102 | The | 115 | The |
103 | .Fn realpath | 116 | .Fn realpath |