.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
-.Fn pathconf "const char *path" "int name"
+.Fo fpathconf
+.Fa "int fildes"
+.Fa "int name"
+.Fc
.Ft long
-.Fn fpathconf "int fd" "int name"
+.Fo pathconf
+.Fa "const char *path"
+.Fa "int name"
+.Fc
.Sh DESCRIPTION
.Pp
The
For
.Nm fpathconf ,
the
-.Fa fd
+.Fa fildes
argument is an open file descriptor.
The
.Fa name
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.
+.It Li _PC_MIN_HOLE_SIZE
+If a file system supports the reporting of holes (see
+.Xr lseek 2 ) ,
+.Fn pathconf
+and
+.Fn fpathconf
+return a positive number that represents the minimum hole size returned in
+bytes.
+The offsets of holes returned will be aligned to this same value.
+A special value of 1 is returned if the file system does not specify the minimum
+hole size but still reports holes.
.El
.Sh RETURN VALUES
If the call to
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 implementation does not support an association of the variable
name with the associated file.
.El
-.Fn Pathconf
+.Pp
+.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 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
-.Bl -tag -width [EFAULT]
-.Fn Fpathconf
+.Bl -tag -width ENAMETOOLONGAA
+.Fn fpathconf
will fail if:
+.\" ===========
.It Bq Er EBADF
-.Fa fd
+.Fa fildes
is not a valid open file descriptor.
+.\" ===========
.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