z/OS UNIX System Services File System Interface Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


vn_pathconf — Determine configurable pathname values

z/OS UNIX System Services File System Interface Reference
SA23-2285-00

Function

The vn_pathconf operation returns the current value of a configurable limit or option that is associated with a file or directory.

Environment on entry and exit

See Environment for PFS operations.

Input parameter format

vn_pathconf (Token_structure,
             OSI_structure,
             Audit_structure,
             Option,
             Return_value,
             Return_code,
             Reason_code)

Parameters

Token_structure
Supplied parameter
Type:
TOKSTR
Length:
Specified by TOKSTR.ts_hdr.cblen.

The Token_structure represents the file (vnode) that is being operated on. It contains the PFS's initialization token, mount token, and the file token. Refer to LFS/PFS control block structure for a discussion of this structure, and to the TOKSTR typedef in BPXYPFSI in Interface structures for C language servers and clients for its mapping.

OSI_structure
Supplied and returned parameter
Type:
OSI
Length:
Specified by OSI.osi_hdr.cblen.

The OSI_structure contains information that is used by the OSI operations that may be called by the PFS. See OSI services for more information.

It also contains MVS-specific information that needs to be passed to the PFS, including SMF accounting fields, a work area, a recovery area, and an optional pointer to an output ATTR structure. For more details on the OSI structure, see The OSI structure.

This area is mapped by the OSI typedef in BPXYPFSI in Interface structures for C language servers and clients.

Audit_structure
Supplied parameter
Type:
CRED
Length:
Specified by CRED.cred_hdr.cblen.

The Audit_structure contains information that is used by the security product for access checks and auditing. It is passed to most SAF routines that are invoked by the PFS.

Refer to Security responsibilities and considerations for a discussion of security processing, and to the CRED typedef in BPXYPFSI in Interface structures for C language servers and clients for the mapping of this structure.

Option
Supplied parameter
Type:
Integer
Length:
Fullword
The option parameter contains a value that indicates which configurable limit or option is returned in Return_value. These values are defined in unistd.h and are:
Variable Returned Description
_PC_CHOWN_RESTRICTED Change ownership function is restricted to a process with appropriate privileges, and to changing the group ID (GID) of a file only to the effective group ID of the process or to one of its supplementary group IDs.
_PC_LINK_MAX Maximum value of a file's link count.
_PC_MAX_CANON Maximum number of bytes in a terminal canonical input line.
_PC_MAX_INPUT Minimum number of bytes for which space is to be available in a terminal input queue; therefore, the maximum number of bytes a portable application may require to be typed as input before it reads them.
_PC_NAME_MAX Maximum number of bytes in a filename (not a string length; count excludes a terminating null).
_PC_NO_TRUNC Pathname components longer than 255 bytes generate an error.
_PC_PATH_MAX Maximum number of bytes in a pathname (not a string length; count excludes a terminating null).
_PC_PIPE_BUF Maximum number of bytes that can be written atomically when writing to a pipe.
_PC_VDISABLE Terminal special characters that are maintained by the system can be disabled using this character value.
Return_value
Returned parameter
Type:
Integer
Length:
Fullword

The name of a fullword in which the vn_pathconf operation returns the current value of the pathname variable that corresponds to Name specified, or -1 if not successful.

If the named pathname variable does not have a limit for the specified file, Return_value is set to -1 and Return_code and Reason_code remain unchanged.

If _PC_CHOWN_RESTRICTED is specified for Option, and _POSIX_CHOWN_RESTRICTED is active, Return_value is set to 1.

If _PC_CHOWN_RESTRICTED is specified for Option, and _POSIX_CHOWN_RESTRICTED is not active, Return_value is set to 0.

If _PC_NO_TRUNC is specified for Option, and _POSIX_NO_TRUNC is active, Return_value is set to 1.

If _PC_NO_TRUNC is specified for Option, and _POSIX_NO_TRUNC is not active, Return_value is set to 0.

Return_code
Returned parameter
Type:
Integer
Length:
Fullword

A fullword in which the vn_pathconf operation stores the return code. The vn_pathconf operation returns Return_code only if Return_value is -1. For a complete list of supported return code values, see z/OS UNIX System Services Messages and Codes.

Reason_code
Returned parameter
Type:
Integer
Length:
Fullword

A fullword in which the vn_pathconf operation stores the reason code. The vn_pathconf operation returns Reason_code only if Return_value is -1. Reason_code further qualifies the Return_code value. These reason codes are documented by the PFS.

Implementation notes

Specific processing notes
  • If the PFS does not have a limit for the specified option, Return_value is set to -1, but Return_code and Reason_code are unchanged. A Return_value of -1 in this case represents a limit of infinity (or no limit) for the requested option.
  • The vn_pathconf operation is not invoked by the LFS if the PATH_MAX option is specified. The LFS value for PATH_MAX, 1023, is returned.
  • If the PC_NAME_MAX option is specified, the LFS compares its value to the PFS value, and returns the minimum.
Serialization provided by the LFS

The vn_pathconf operation is invoked with a shared latch held on the vnode.

Security calls to be made by the PFS
None.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014