Using the HP-UX libIO Library
The defined key used to search switch tables are described in Table 4.
Table 4 – Defined Key to Search Switch Tables
TYPE KEYS
S_CDEVSW/S_BDEVSW
"c_major", "is_pseudo", "b_major",
"driver_name", "class", "is_char",
"is_block", and "is_dyn_major"
io_search_array()
This routine searches the kernel I/O system and returns the next token that matches
the given search criteria. The function prototype of this routine is:
io_token_t io_search_array(io_token_t token, int type,
int qual, char *key[], void *dat[]);
The token can be used with the io_query() routine to obtain information about the
token. The io_search_array_batch() will return a maximum of 500 tokens at a
time. The caller should validate the returned tokens by checking if the value is not
NULL.
io_search_array_batch()
This routine is an enhancement to io_search_array(). It returns an array of
tokens. The function prototype for this routine is:
int io_search_array_batch(io_token_t token, int type,
int qual, char *key[], void *dat[],
io_token_t *ret token);
The type, qualifier, and keys are described in io_search().
io_query()
io_query() is used to get information about a token previously obtained by a call
to io_search(). The function prototype for this routine is:
int io_query(io_token_t token, int type, char *key,
void *ptr);