Using the HP-UX libIO Library

This routine returns an I/O node corresponding to the specified dev_t and
dev_type. The type of the dev_t (D_CHR or D_BLK) is specified as input. The
function prototype of this routine is:
io_token_t io_dev_to_node(dev_t dev, int dev_type);
io_legacy_to_new_dev()
This routine maps a legacy dev_t to an agile dev_t. The type of the dev_t
(D_CHR or D_BLK) is specified as input. The interface returns the agile dev_t or
IO_ERROR in case of an error. The function prototype of this routine is:
int io_legacy_to_new_dev(dev_t legacy_dev, int dev_type,
dev_t *new_dev);
io_new_to_legacy_devs()
This routine gets all the legacy dev_ts of the given agile dev_t. It takes the agile
dev_t, dev_t type (D_CHR or D_BLK), and dev_arry as input parameters.
It returns the legacy dev_ts in the dev_arry argument and the count of the
dev_ts in count. The dev_ts returned will have the same device specific options
and dev_t type as the agile dev_t. The function prototype of this routine is:
int io_new_to_legacy_devs(dev_t new_dev, int dev_type,
dev_t *dev_arry, int *count);
The caller of io_new_to_legacy_devs() should allocate memory for dev_arry
and set count to the size of dev_arr. The caller can initially allocate dev_arry of
size IO_MAX_DEVS_IN_IOQ (48). If the memory is not sufficient to return all the
legacy dev_ts, io_new_to_legacy_devs() will return IO_E_BUF_TOO_SMALL
and the count of dev_ts in count. The caller of io_new_to_legacy_devs()
should reallocate memory for dev_arry and call the interface again to retrieve the
dev_ts.
This routine retrieves the legacy dev_t(s) for a given agile dev_t if successful or
IO_ERROR in case of an error.
io_block_to_raw()
This routine maps the block dev_t to the character dev_t. The function prototype of
this routine is: