Function
The vn_getattr operation gets the
attributes of a file.
Input parameter format
vn_getattr (Token_structure,
OSI_structure,
Audit_structure,
Attribute_structure,
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.
- Attribute_structure
- Supplied and returned parameter
- Type:
- ATTR
- Length:
- Specified by ATTR.at_hdr.cblen.
An area used by the vn_getattr operation to return
the file attributes for the file that is specified by the vnode token.
Before a call to vn_getattr, Attribute_structure must be initialized
with the ID and length fields set correctly and the unused fields
set to zero. This area is mapped by typedef ATTR in the BPXYVFSI header
file (see Interface structures for C language servers and clients).
- Return_value
- Returned parameter
- Type:
- Integer
- Length:
- Fullword
The name of a fullword in which the vn_getattr
service returns the results of the operation, as one of the following:
- Return_value
- Meaning
- -1
- The operation was not successful. The Return_code and Reason_Code
values must be filled in by the PFS when Return_value is -1.
- 0
- The operation was successful.
- Return_code
- Returned parameter
- Type:
- Integer
- Length:
- Fullword
A fullword in which the vn_getattr service stores
the return code. The vn_getattr service returns Return_code only if
Return_value is -1. See z/OS UNIX System Services Messages and Codes for
a complete list of supported return code values.
- Reason_code
- Returned parameter
- Type:
- Integer
- Length:
- Fullword
A fullword in which the vn_getattr service stores
the reason code. The vn_getattr service 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
- Overview of vn_getattr processing
vn_getattr is used to read file attributes, as described in Getting and setting attributes.
- Specific processing notes
- The input attribute_structure length may not match the length
that is supported by the PFS. The PFS must return the minimum of:
- Input ATTR.at_hdr.cblen
- The attribute_structure length that is supported by this release
of the PFS
The returned value in ATTR.at_hdr.cblen must match the size
returned.
- Time-related fields that are marked for update must be updated
before the attributes are returned.
- Serialization provided by the LFS
The vn_getattr operation is invoked with a shared latch held
on the vnode of the directory.
- Security calls to be made by the PFS
- None.