X-Git-Url: https://git.saurik.com/apple/libc.git/blobdiff_plain/9385eb3d10ebe5eb398c52040ec3dbfba9b0cdcf..507116e319a1470bb0a5040d4d23e5c76955ef97:/gen/FreeBSD/getcwd.3 diff --git a/gen/FreeBSD/getcwd.3 b/gen/FreeBSD/getcwd.3 index b095a46..707b8b8 100644 --- a/gen/FreeBSD/getcwd.3 +++ b/gen/FreeBSD/getcwd.3 @@ -9,10 +9,6 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by the University of -.\" California, Berkeley and its contributors. .\" 4. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. @@ -30,9 +26,9 @@ .\" SUCH DAMAGE. .\" .\" @(#)getcwd.3 8.2 (Berkeley) 12/11/93 -.\" $FreeBSD: src/lib/libc/gen/getcwd.3,v 1.15 2001/10/01 16:08:51 ru Exp $ +.\" $FreeBSD$ .\" -.Dd November 24, 1997 +.Dd April 17, 2010 .Dt GETCWD 3 .Os .Sh NAME @@ -64,7 +60,9 @@ If .Fa buf is .Dv NULL , -space is allocated as necessary to store the pathname. +space is allocated as necessary to store the pathname and +.Fa size +is ignored. This space may later be .Xr free 3 Ns 'd . .Pp @@ -78,7 +76,7 @@ argument and a size of .Dv MAXPATHLEN (as defined in the include file -.Aq Pa sys/param.h ) . +.In sys/param.h ) . Obviously, .Fa buf should be at least @@ -112,8 +110,6 @@ The function will fail if: .Bl -tag -width Er -.It Bq Er EACCES -Read or search permission was denied for a component of the pathname. .It Bq Er EINVAL The .Fa size @@ -128,6 +124,16 @@ The argument is greater than zero but smaller than the length of the pathname plus 1. .El +.Pp +The +.Fn getcwd +function +may fail if: +.Bl -tag -width Er +.It Bq Er EACCES +Read or search permission was denied for a component of the pathname. +This is only checked in limited cases, depending on implementation details. +.El .Sh SEE ALSO .Xr chdir 2 , .Xr fchdir 2 ,