[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]

Technical Reference: Base Operating System and Extensions , Volume 2


SYS_QDVSW sysconfig Operation

Purpose

Checks the status of a device switch entry in the device switch table.

Description

The SYS_QDVSW sysconfig operation checks the status of a device switch entry in the device switch table.

The parmp parameter on the sysconfig subroutine points to a qry_devsw structure defined in the sys/sysconfig.h file. The parmlen parameter on the subroutine should be set to the length of the qry_devsw structure.

The qry_devsw field in the qry_devsw structure is modified to reflect the status of the device switch entry specified by the qry_devsw field. ( Only the major portion of the devno field is relevant.) The following flags can be returned in the status field:

DSW_UNDEFINED The device switch entry is not defined if this flag has a value of 0 on return.
DSW_DEFINED The device switch entry is defined.
DSW_CREAD The device driver in this device switch entry provides a routine for character reads or raw input. This flag is set when the device driver provides a ddread entry point.
DSW_CWRITE The device driver in this device switch entry provides a routine for character writes or raw output. This flag is set when the device driver provides a ddwrite entry point.
DSW_BLOCK The device switch entry is defined by a block device driver. This flag is set when the device driver provides a ddstrategy entry point.
DSW_MPX The device switch entry is defined by a multiplexed device driver. This flag is set when the device driver provides a ddmpx entry point.
DSW_SELECT The device driver in this device switch entry provides a routine for handling the select (select Subroutine) or poll subroutines. This flag is set when the device driver provides a ddselect entry point.
DSW_DUMP The device driver defined by this device switch entry provides the capability to support one or more of its devices as targets for a kernel dump. This flag is set when the device driver has provided a dddump entry point.
DSW_CONSOLE The device switch entry is defined by the console device driver.
DSW_TCPATH The device driver in this device switch entry supports devices that are considered to be in the trusted computing path and provides support for the revoke (revoke Subroutine) and frevoke subroutines. This flag is set when the device driver provides a ddrevoke entry point.
DSW_OPENED The device switch entry is defined and the device has outstanding opens. This flag is set when the device driver has at least one outstanding open.

The DSW_UNDEFINED condition is indicated when the device switch entry has not been defined or has been defined and subsequently deleted. Multiple status flags may be set for other conditions of the device switch entry.

Return Values

If no error is detected, this operation returns with a value of 0. If an error is detected, the return value is set to a value of -1.

Error Codes

When an error is dected, the errno global variable is also set to one of the following values:

EACESS The calling process does not have the required privilege.
EINVAL Device number exceeds the maximum allowed by the kernel.
EFAULT The calling process does not have sufficient authority to access the data area described by the parmp and parmlen parameters provided on the system call. This error is also returned if an I/O error occurred when accessing data in this area.

File


sys/sysconfig.h Contains structure definitions.

Related Information

The sysconfig (sysconfig Subroutine) subroutine.

The ddread device driver entry point, ddwrite device driver entry point, ddstrategy device driver entry point, ddmpx device driver entry point, ddselect device driver entry point, dddump device driver entry point, ddrevoke device driver entry point.

The console special file.

Device Configuration Subsystem Programming Introduction in AIX 5L Version 5.1 Kernel Extensions and Device Support Programming Concepts.

Programming in the Kernel Environment Overview in AIX 5L Version 5.1 Kernel Extensions and Device Support Programming Concepts.

Understanding Kernel Extension Binding in AIX 5L Version 5.1 Kernel Extensions and Device Support Programming Concepts.


[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]