The w_getmntent callable service gets information about mounted file systems.
Operation | Environment |
---|---|
Authorization: | Supervisor state or problem state, any PSW key |
Dispatchable unit mode: | Task |
Cross memory mode: | PASN = HASN |
AMODE (BPX1GMN): | 31-bit |
AMODE (BPX4GMN): | 64-bit |
ASC mode: | Primary address space control (ASC) mode |
Interrupt status: | Enabled for interrupts |
Locks: | Unlocked |
Control parameters: | All parameters must be addressable by the caller and in the primary address space. |
|
AMODE 64 callers use BPX4GMN with the same parameters.
The name of a fullword that contains the size of the specified buffer.
The name of the buffer where the information about the mount entries is stored. The area consists of a header followed by a series of entries describing the file systems, all of which are mapped by BPXYMNTE. For information about the content of this area, see BPXYMNTE — Map response and element structure of w_getmntent.
The name of a fullword in which the w_getmntent service returns the number of mount entries that were written to the buffer, or -1 if unsuccessful. A 0 indicates that no more mount entries were found.
Return_code | Explanation |
---|---|
EINVAL | Parameter error; for example, the buffer is too short to hold one entry, or the mount header portion of the buffer was not cleared before the first call. The following reason codes can accompany the return code: JRBuffTooSmall, JRInvalidCursor, JRInvalidParms, and JRFilesysNotThere. |
The name of a fullword in which the w_getmntent service stores the reason code. The w_getmntent 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.
If no parameter was specified when the file system was mounted, MNTENTPARMLEN and MNTENTPARMOFFSET are each zero. If a parameter was specified, its address is the sum of the address of MNTE and the contents of MNTENTPARMOFFSET.
If an entry together with its mount parameter does not fit in the buffer, the entry is returned without the mount parameter. In this case, MNTENTPARMLEN contains the length of the mount parameter, and MNTENTPARMOFFSET is zero. To ensure that at least one entry, including the mount parameter, is returned, you should allocate space for at least two entries.
A device number of x40000000 can be provided to indicate the returned path name should be up to 64 bytes of the mount point path name at the time of the mount.
Aggregate names are present for zFS file systems. They may be up to 44 characters long, and are returned in a string that is terminated by a null character. The returned length does not include the null terminator byte.
There are no restrictions on the use of the w_getmntent service.
For an example using this callable service, see BPX1GMN (w_getmntent) example.