Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ pathconf(3) — AIX PS/2 1.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

sysconf



PATHCONF(3,L)               AIX Technical Reference               PATHCONF(3,L)



-------------------------------------------------------------------------------
pathconf, fpathconf



PURPOSE

Retrieves file implementation characteristics.

LIBRARY

Standard C Library (libc.a)

SYNTAX

#include <unistd.h>



                long pathconf (path, name)  long fpathconf (fildes, name)
                char *path;                 int fildes;
                int name;                   int name;



DESCRIPTION

The pathconf system call allows an application to determine the characteristics
of operations supported by the file system underlying the file named by path.
Read, write, or execute permission of the named file is not required, but all
directories in the path leading to the file must be searchable.

The fpathconf system call allows an application to retrieve the same
information for an open file.  In this case, fildes is a file descriptor
returned by a successful openx, fcntl, or pipe system call.

The name parameter specifies the configuration attribute to be queried.  If
this attribute is not applicable to the file specified by path or fildes,
pathconf returns an error.  Symbolic values for the name parameter are defined
in unistd.h:

Attribute         Meaning

_PC_LINK_MAX      The maximum number of links to the file; this is usually
                  either 1 or 65,535.

_PC_MAX_CANON     The maximum number of bytes in a canonical input line.  This
                  is applicable only to terminal devices.

_PC_MAX_INPUT     The number of types allowed in an input queue.  This is
                  applicable only to terminal devices.




Processed November 7, 1990       PATHCONF(3,L)                                1





PATHCONF(3,L)               AIX Technical Reference               PATHCONF(3,L)



_PC_NAME_MAX      Maximum number of bytes in a file name (not including a
                  terminating NULL); this may be as small as 14, but is never
                  larger than 255.  This is applicable only to a directory
                  file.

_PC_PATH_MAX      Maximum number of bytes in a path name (not including a
                  terminating NULL); this is never larger than 65,535.

_PC_PIPE_BUF      Maximum number of bytes guaranteed to be written atomically.
                  This is applicable only to a FIFO.

_PC_CHOWN_RESTRICTED
                  Returns 1 indicating that the chown function is restricted to
                  use by the superuser.

_PC_NO_TRUNC      Returns 1 if supplying a component name longer than allowed
                  by _PC_PATH_MAX causes an error.  Returns 0 if long component
                  names are truncated.  This is applicable only to a directory
                  file.

_PC_VDISABLE      This is always 0; no disabling character is defined.  This is
                  applicable only to a terminal device.

RETURN VALUE

If the pathconf or fpathconf system call is successful, the specified parameter
is returned.  If the pathconf or fpathconf system call fails, a value of -1 is
returned and errno is set to indicate the error.  If the value corresponding to
name has no limit for the path or file descriptor, the pathconf and fpathconf
system calls return -1 without changing errno.

ERROR CONDITIONS

The pathconf system call fails if one or more of the following are true.
(These errors are applicable only to the pathconf system call and any service
which requires path name resolution.)

ENOTDIR     A component of the path prefix is not a directory.

ENOENT      A component of the path prefix does not exist, or the process has
            the disallow truncation attribute.

EACCES      Search permission is denied on a component of the path prefix.

ENOENT      The path name is null.

ESTALE      The process's root or current directory is located in an NFS
            virtual file system that has been unmounted.

EFAULT      The path parameter points to a location outside of the process's
            allocated address space.




Processed November 7, 1990       PATHCONF(3,L)                                2





PATHCONF(3,L)               AIX Technical Reference               PATHCONF(3,L)



ELOOP       Too many symbolic links were encountered in translating the path
            name.

ENAMETOOLONG
            A component of a path name exceeded 255 characters, or an entire
            path name exceeded 1023 characters.

EIO         An I/O error occurred during the operation.

EINTR       A signal was caught during the system call.

The fpathconf system call fails if the following is true:

EBADF  The fildes parameter does not refer to an open file.

The pathconf and the fpathconf system calls fail if the following is true:

EINVAL      The name parameter specifies an unknown or inapplicable
            characteristic.

RELATED INFORMATION

In this book:  "sysconf."
































Processed November 7, 1990       PATHCONF(3,L)                                3



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026