Using the HP-UX libIO Library
The defined key values are described in io_search().
io_query_array()
This routine is an enhancement to io_query(). It returns multiple keys for a token
at one time. The maximum number of keys is set to12 (IO_MAX_NUM_QUERY).
The function prototype for this routine is:
int io_query_array(io_token_t token, int type, int nkeys,
char *key [], void *ptr[]);
io_query_batch()
This routine copies the key/dat arguments (one or more pair) into an array and calls
io_query_array() with the passed search parameters. The function prototype for
this routine is:
int io_query_batch(io_token_t token, int type, char *key1,
void *dat1, char *key2, void *dat2, ... ,char *keyN,
void *datN, NULL);
Examples
Example 1
Get an I/O node of a disk device from the legacy kernel I/O data structure and
print the hardware path corresponding to that node.
Algorithm
1. Initialize the libIO library.
2. Search for the disk device in the kernel data structures.
3. Get the hardware path of this disk device and print it.
4. Terminate the connection.
Solution
#include <sys/libIO.h>
#include <stdio.h>
main()
{