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


v_ioctl (BPX1VIO/BPX4VIO) - Convey a command to a physical file system

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

Function

The v_ioctl callable service conveys a command to a physical file system. The specific action that is specified by the v_ioctl callable service varies by physical file system, and is defined by the physical file system.

Requirements

Operation Environment
Authorization: Supervisor state or problem state, any PSW key
Dispatchable unit mode: Task
Cross memory mode: PASN = HASN
AMODE (BPX1VIO): 31-bit
AMODE (BPX4VIO): 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

CALL BPX1VIO,(Vnode_token,
              OSS,
              Command,
              Argument_length,
              Argument,
              Return_value,
              Return_code,
              Reason_code)

AMODE 64 callers use BPX4VIO with the same parameters.

Parameters

Vnode_token
Supplied parameter
Type:
Token
Length:
8 bytes

The name of an 8-byte area that contains a vnode token that represents the file.

OSS
Supplied and returned parameter
Type:
Structure
Length:
OSS#LENGTH (from the BPXYOSS macro)

The name of an area that contains operating-system-specific parameters. This area is mapped by the BPXYOSS macro (see BPXYOSS — Map operating system specific information).

Command
Supplied parameter
Type:
Integer
Length:
Fullword

The name of a fullword that contains the ioctl command that is to be passed to the physical file system. This area is mapped by the BPXYIOCC macro (see Mapping macros in z/OS UNIX System Services Programming: Assembler Callable Services Reference).

Argument_length
Supplied and returned parameter
Type:
Integer
Length:
Fullword

The name of a fullword that contains the length of the argument. The length of the argument is specified as an integer value in the range 0-51200.

Argument
Supplied and returned parameter
Type:
Defined by the physical file system
Character set:
No restriction
Length:
Specified by the Argument_length parameter

Specifies the name of a buffer, of length Argument_length, containing the argument to be passed to the physical file system. This buffer is also used for any output.

Return_value
Returned parameter
Type:
Integer
Length:
Fullword

The name of a fullword in which the v_ioctl service returns 0 if the request is successful, or -1 if it is not successful. For the getfacl command, return_value contains the FACL length if the request is successful.

Return_code
Returned parameter
Type:
Integer
Length:
Fullword
The name of a fullword in which the v_ioctl service stores the return code. The v_ioctl service returns a Return_code only if Return_value is -1. See z/OS UNIX System Services Messages and Codes for a complete list of possible return code values. The v_ioctl service can return one of the following values in the Return_code parameter:
Return_code Explanation
EFAULT The input argument address or any other parameter is incorrect. The following reason codes can accompany the return code: JrReadUserStorageFailed, JrWriteUserStorageFailed.
EINVAL Parameter error; for example, a supplied area was too small. The following reason code can accompany the return code: JRIOBufLengthInvalid.
ENOTDIR The Vnod_Token passed for the Iocc#GetPathName command is not a directory and a parent directory for this object cannot be determined.
EPERM The operation is not permitted. The caller of the service is not registered as a server.
E2BIG The argument_length passed on a SetfACL or GetfACL request was not large enough to contain even the minimum amount of data. The size that is specified must be large enough to hold a RACL_Edit, followed by an FACL and as many FACL_Entry(s) as needed
Reason_code
Returned parameter
Type:
Integer
Length:
Fullword

The name of a fullword in which the v_ioctl service stores the reason code. The v_ioctl service returns a Reason_code only if Return_value is -1. Reason_code further qualifies the Return_code value. See z/OS UNIX System Services Messages and Codes for the reason codes.

Usage notes

  1. For file systems that support access control lists (ACLs), you can use the GetfACL and SetfACL commands. For detailed information about these and other commands, see the Notes section of w_ioctl (BPX1IOC, BPX4IOC) — Control I/O in z/OS UNIX System Services Programming: Assembler Callable Services Reference.
  2. The Iocc#GetPathName command will return the absolute path name of an input directory or file.

    An input file must have been recently looked up or created in order for its path name to be generated. if the only reference to this file has been by a server with the vfs_vget function, it will not be possible to construct the path name because an immediate parent directory cannot be determined.

    If the input directory resides in a file system that has been covered, by the mounting of another file system on a directory in the path name, the command will fail with ENOENT. The OssXMtPt flag can be used to override this check and return a path name without regard to covered mount points that might be encountered. In this case the path name returned can not be used as input to functions like v_rpn() and open() because those functions will cross mount points and will either fail to find the directory or will find a different directory with the same path name in a mounted file system.

Characteristics and restrictions

  1. A process must be registered as a server before the v_ioctl service is permitted; see v_reg (BPX1VRG, BPX4VRG) — Register a process as a server.
  2. The argument is limited to 51200 bytes.

Examples

For an example using this callable service, see BPX1VIO, BPX4VIO (v_ioctl).

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014