w_statvfs (BPX1STF, BPX4STF) — Get the file system status
Function
The w_statvfs callable service obtains status information about a specified file system. You specify the file system by its file system name.
Requirements
Operation | Environment |
---|---|
Authorization: | Supervisor state or problem state, any PSW key |
Dispatchable unit mode: | Task |
Cross memory mode: | PASN = HASN |
AMODE BPX1STF): | 31-bit |
AMODE BPX4STF): | 64-bit |
ASC mode: | Primary mode |
Interrupt status: | Enabled for interrupts |
Locks: | Unlocked |
Control parameters: | All parameters must be addressable by the caller and in the primary address space. |
Format
|
AMODE 64 callers use BPX4STF with the same parameters.
Parameters
- File_system_name
- Supplied parameter
- Type:
- Character string
- Character set:
- Printable characters
- Length:
- 44 bytes
The name of 44-character field that identifies the file system whose status is to be returned. The name must be left-justified and padded on the right with blanks.
This is the file system name as specified on the mount.
- Status_area_length
- Supplied parameter
- Type:
- Integer
- Length:
- Fullword
The name of a fullword containing the length of the area to which the service returns status information.
- Status_area
- Parameter supplied and returned
- Type:
- Structure
- Length:
- Specified by the Status_area_length parameter
The name of an area of length Status_area_length to which the service returns the status information for the file system. The BPXYSSTF macro maps this area. For information on this macro, see BPXYSSTF — Map response structure for file system status.
- Return_value
- Returned parameter
- Type:
- Integer
- Length:
- Fullword
The name of a fullword in which the w_statvfs service returns the length of the status written to the Status_area if the request is successful, or -1 if it is not successful.
- Return_code
- Returned parameter
- Type:
- Integer
- Length:
- Fullword
The name of a fullword in which the w_statvfs service stores the return code. The w_statvfs service returns Return_code only if Return_value is -1. For a complete list of possible return code values, see z/OS UNIX System Services Messages and Codes. The w_statvfs service can return one of the following values in the Return_code parameter:Return_code Explanation EAGAIN Information is temporarily unavailable. This can occur because the mount process for the file system is incomplete. EINVAL Parameter error; for example, File_system_name was not found. The following reason code can accompany the return code: JRFileSysNotThere. - Reason_code
- Returned parameter
- Type:
- Integer
- Length:
- Fullword
The name of a fullword in which the w_statvfs service stores the reason code. The w_statvfs service returns Reason_code only if Return_value is -1. Reason_code further qualifies the Return_code value. For the reason codes, see z/OS UNIX System Services Messages and Codes.
Usage notes
- It is not considered an error if the passed Status_area_length is not sufficient to hold all the returned information. (That is, future expansion is allowed for.) As much information as will fit is written to Status_area, and this amount is returned.
- If a buffer of length of zero is passed to this service, no data is returned and the return value is zero. You can check for the existence of a file system by passing such a length.
- The amount of valid data returned in the Status_area is indicated by the Return_value. This allows for differences in the release levels of z/OS UNIX and the physical file systems.
Related services
Characteristics and restrictions
There are no restrictions on the use of the w_statvfs service.
Examples
For an example using this callable service, see BPX1STF (w_statvfs) example.