summaryrefslogtreecommitdiff
path: root/usr/src/man/man3c
diff options
context:
space:
mode:
authorRobert Mustacchi <rm@joyent.com>2014-12-19 22:05:59 +0000
committerRobert Mustacchi <rm@joyent.com>2014-12-27 08:30:20 -0800
commit820218f30a3ad84d92aa2970dcac9eb5cf69aaa9 (patch)
tree3b16c80843ef94932c9c52b604324a64c5eef15c /usr/src/man/man3c
parent8b87c15576a5138f88a969448b43561bf5968c09 (diff)
downloadillumos-joyent-820218f30a3ad84d92aa2970dcac9eb5cf69aaa9.tar.gz
3846 canonicalize_file_name() needs a man page
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com> Approved by: Richard Lowe <richlowe@richlowe.net>
Diffstat (limited to 'usr/src/man/man3c')
-rw-r--r--usr/src/man/man3c/Makefile3
-rw-r--r--usr/src/man/man3c/realpath.3c16
2 files changed, 12 insertions, 7 deletions
diff --git a/usr/src/man/man3c/Makefile b/usr/src/man/man3c/Makefile
index 6240c88c40..856cf5e168 100644
--- a/usr/src/man/man3c/Makefile
+++ b/usr/src/man/man3c/Makefile
@@ -668,6 +668,7 @@ MANLINKS= FD_CLR.3c \
btowc_l.3c \
bzero.3c \
calloc.3c \
+ canonicalize_file_name.3c \
catclose.3c \
cfgetospeed.3c \
cfsetospeed.3c \
@@ -1436,6 +1437,8 @@ bzero.3c := LINKSRC = bstring.3c
btowc_l.3c := LINKSRC = btowc.3c
+canonicalize_file_name.3c := LINKSRC = realpath.3c
+
catclose.3c := LINKSRC = catopen.3c
cfgetospeed.3c := LINKSRC = cfgetispeed.3c
diff --git a/usr/src/man/man3c/realpath.3c b/usr/src/man/man3c/realpath.3c
index efce404f83..c3de5205e6 100644
--- a/usr/src/man/man3c/realpath.3c
+++ b/usr/src/man/man3c/realpath.3c
@@ -1,4 +1,5 @@
'\" te
+.\" Copyright (c) 2014, Joyent, Inc.
.\" Copyright 1989 AT&T. Copyright (c) 2003, Sun Microsystems, Inc. All Rights Reserved. Portions Copyright (c) 1992, X/Open Company Limited. All Rights Reserved.
.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
.\" http://www.opengroup.org/bookstore/.
@@ -7,7 +8,7 @@
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
-.TH REALPATH 3C "Oct 9, 2003"
+.TH REALPATH 3C "Dec 20, 2014"
.SH NAME
realpath \- resolve pathname
.SH SYNOPSIS
@@ -17,10 +18,11 @@ realpath \- resolve pathname
\fBchar *\fR\fBrealpath\fR(\fBconst char *restrict\fR \fIfile_name\fR,
\fBchar *restrict\fR \fIresolved_name\fR);
+
+\fBchar *\fR\fBcanonicalize_file_name\fR(\fBconst char *\fR\fIpath\fR);
.fi
.SH DESCRIPTION
-.sp
.LP
The \fBrealpath()\fR function derives, from the pathname pointed to by
\fIfile_name\fR, an absolute pathname that names the same file, whose
@@ -28,15 +30,18 @@ resolution does not involve "\fB\&.\fR", "\fB\&..\fR", or symbolic links. The
generated pathname is stored as a null-terminated string, up to a maximum of
{\fBPATH_MAX\fR} bytes (defined in \fBlimits.h\fR(3HEAD)), in the buffer
pointed to by \fIresolved_name\fR.
-.SH RETURN VALUES
.sp
.LP
+The \fBcanonicalize_file_name()\fR function is equivalent to calling
+\fBrealpath\fR(\fIpath\fR, \fINULL\fR). This function is only provided for
+compatibility.
+.SH RETURN VALUES
+.LP
On successful completion, \fBrealpath()\fR returns a pointer to the resolved
name. Otherwise, \fBrealpath()\fR returns a null pointer and sets \fBerrno\fR
to indicate the error, and the contents of the buffer pointed to by
\fIresolved_name\fR are left in an indeterminate state.
.SH ERRORS
-.sp
.LP
The \fBrealpath()\fR function will fail if:
.sp
@@ -137,7 +142,6 @@ Insufficient storage space is available.
.RE
.SH USAGE
-.sp
.LP
The \fBrealpath()\fR function operates on null-terminated strings.
.sp
@@ -149,7 +153,6 @@ resolved path.
The \fBrealpath()\fR function might fail to return to the current directory if
an error occurs.
.SH ATTRIBUTES
-.sp
.LP
See \fBattributes\fR(5) for descriptions of the following attributes:
.sp
@@ -167,7 +170,6 @@ MT-Level MT-Safe
.TE
.SH SEE ALSO
-.sp
.LP
\fBgetcwd\fR(3C), \fBlimits.h\fR(3HEAD), \fBsysconf\fR(3C),
\fBattributes\fR(5), \fBstandards\fR(5)