libIO.3x (2010 09)
l
libIO(3X) libIO(3X)
IO_ERROR - Otherwise. io_errno is set to indicate the error.
Errors
[IO_E_DCONF_ACCESS]
[IO_E_DCONF_OPEN]
[IO_E_NODE_NOEXIST]
[IO_E_SYSCALL]
libIO FUNCTION
Name
io_query() - gets information about a token
Synopsis
int io_query(io_token_t token,int type,char *key,void *ptr);
Description
io_query() is used to get information about a token previously obtained by a call to
io_search().
The data corresponding to key is copied to the buffer pointed to by ptr . key must be one of the strings
known to the I/O subsystem. Note that not all keys are defined for all queries. If ptr is NULL, then
io_query() just returns the number of bytes which would have been copied. See the examples in
io_search().
It is the users responsibility to ensure that the buffer pointed to by ptr is large enough to contain the
requested information.
Arguments
token Token returned by a call to
io_search().
type Specifies type of query.
Only one should be specified. The defined values are:
S_IOTREE Causes a query of the I/O tree.
S_IOTREE_EXT Causes a query of the agile I/O tree.
S_BDEVSW Causes a query of a block device switch table.
S_CDEVSW Causes a query of a character device switch table.
key String corresponding to query field.
ptr Pointer to copy of queried data.
Return Value
Number of bytes copied - Upon success.
IO_ERROR - Otherwise. io_errno is set to indicate the error.
Errors
[IO_E_DCONF_ACCESS]
[IO_E_DCONF_OPEN]
[IO_E_KEY_TOKEN_DEF]
[IO_E_PARM]
[IO_E_SYSCALL]
libIO FUNCTION
Name
io_query_batch() - creates multiple keys to call io_query_array()
Synopsis
int io_query_batch(io_token_t token, int type, char *key1,
void *dat1,char *key2, void *dat2, ...,
char *keyN,void *datN,NULL);
Description
This routine copies the key/dat arguments (one or more pair) into an array and calls
io_query_array() with the passed search parameters.
HP-UX 11i Version 3: September 2010 − 9 − Hewlett-Packard Company 9