]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/man/man2/pathconf.2
xnu-2782.30.5.tar.gz
[apple/xnu.git] / bsd / man / man2 / pathconf.2
index a947bd1e341cbfdc2ac51bb40b744f5c90d3f6b3..9743384ceb6177d19bd887d43d2fa0f5a8b63b47 100644 (file)
 .Dt PATHCONF 2
 .Os BSD 4
 .Sh NAME
 .Dt PATHCONF 2
 .Os BSD 4
 .Sh NAME
-.Nm pathconf ,
-.Nm fpathconf
+.Nm fpathconf ,
+.Nm pathconf
 .Nd get configurable pathname variables
 .Sh SYNOPSIS
 .Fd #include <unistd.h>
 .Ft long
 .Nd get configurable pathname variables
 .Sh SYNOPSIS
 .Fd #include <unistd.h>
 .Ft long
-.Fn pathconf "const char *path" "int name"
+.Fo fpathconf
+.Fa "int fildes"
+.Fa "int name"
+.Fc
 .Ft long
 .Ft long
-.Fn fpathconf "int fd" "int name"
+.Fo pathconf
+.Fa "const char *path"
+.Fa "int name"
+.Fc
 .Sh DESCRIPTION
 .Pp
 The
 .Sh DESCRIPTION
 .Pp
 The
@@ -64,7 +70,7 @@ argument is the name of a file or directory.
 For
 .Nm fpathconf ,
 the
 For
 .Nm fpathconf ,
 the
-.Fa fd
+.Fa fildes
 argument is an open file descriptor.
 The
 .Fa name
 argument is an open file descriptor.
 The
 .Fa name
@@ -97,6 +103,16 @@ system call, otherwise 0.
 Return 1 if file names longer than KERN_NAME_MAX are truncated.
 .It Li _PC_VDISABLE
 Returns the terminal character disabling value.
 Return 1 if file names longer than KERN_NAME_MAX are truncated.
 .It Li _PC_VDISABLE
 Returns the terminal character disabling value.
+.It Li _PC_XATTR_SIZE_BITS
+Returns the number of bits used to store maximum extended 
+attribute size in bytes.  For example, if the maximum 
+attribute size supported by a file system is 128K, the 
+value returned will be 18.  However a value 18 can mean 
+that the maximum attribute size can be anywhere from 
+(256KB - 1) to 128KB.  As a special case, the resource 
+fork can have much larger size, and some file system 
+specific extended attributes can have smaller and preset 
+size; for example, Finder Info is always 32 bytes.
 .El
 .Sh RETURN VALUES
 If the call to
 .El
 .Sh RETURN VALUES
 If the call to
@@ -119,41 +135,53 @@ and
 functions shall return -1 and set
 .Va errno
 to the corresponding value.
 functions shall return -1 and set
 .Va errno
 to the corresponding value.
-.Bl -tag -width Er
+.Bl -tag -width ENAMETOOLONGAA
+.\" ===========
 .It Bq Er EINVAL
 The value of the
 .Fa name
 argument is invalid.
 .It Bq Er EINVAL
 The value of the
 .Fa name
 argument is invalid.
+.\" ===========
 .It Bq Er EINVAL
 The implementation does not support an association of the variable
 name with the associated file.
 .El
 .It Bq Er EINVAL
 The implementation does not support an association of the variable
 name with the associated file.
 .El
+.Pp
 .Fn Pathconf
 will fail if:
 .Bl -tag -width ENAMETOOLONGAA
 .Fn Pathconf
 will fail if:
 .Bl -tag -width ENAMETOOLONGAA
-.It Bq Er ENOTDIR
-A component of the path prefix is not a directory.
+.\" ===========
+.It Bq Er EACCES
+Search permission is denied for a component of the path prefix.
+.\" ===========
+.It Bq Er EIO
+An I/O error occurs while reading from or writing to the file system.
+.\" ===========
+.It Bq Er ELOOP
+Too many symbolic links are encountered in translating the pathname.
+This is taken to be indicative of a looping symbolic link.
+.\" ===========
 .It Bq Er ENAMETOOLONG
 A component of a pathname exceeded 255 characters,
 or an entire path name exceeded 1023 characters.
 .It Bq Er ENAMETOOLONG
 A component of a pathname exceeded 255 characters,
 or an entire path name exceeded 1023 characters.
+.\" ===========
 .It Bq Er ENOENT
 The named file does not exist.
 .It Bq Er ENOENT
 The named file does not exist.
-.It Bq Er EACCES
-Search permission is denied for a component of the path prefix.
-.It Bq Er ELOOP
-Too many symbolic links were encountered in translating the pathname.
-.It Bq Er EIO
-An I/O error occurred while reading from or writing to the file system.
+.\" ===========
+.It Bq Er ENOTDIR
+A component of the path prefix is not a directory.
 .El
 .Pp
 .El
 .Pp
-.Bl -tag -width [EFAULT]
+.Bl -tag -width ENAMETOOLONGAA
 .Fn Fpathconf
 will fail if:
 .Fn Fpathconf
 will fail if:
+.\" ===========
 .It Bq Er EBADF
 .It Bq Er EBADF
-.Fa fd
+.Fa fildes
 is not a valid open file descriptor.
 is not a valid open file descriptor.
+.\" ===========
 .It Bq Er EIO
 .It Bq Er EIO
-An I/O error occurred while reading from or writing to the file system.
+An I/O error occurs while reading from or writing to the file system.
 .El
 .Sh SEE ALSO
 .Xr sysctl 3
 .El
 .Sh SEE ALSO
 .Xr sysctl 3