HP-UX Reference (11i v3 07/02) - 3 Library Functions A-M (vol 6)

l
libIO(3X) libIO(3X)
Synopsis
int io_new_to_legacy_hwpath (hw_path_t *from, leg_hw_path_t *to);
Description
io_new_to_legacy_hwpath()
converts a hardware path used on HP-UX 11i V3 or later
(
hw_path_t) data structure to the pre-HP-UX 11i V3 hardware path (
leg_hw_path_t
). If
hw_path_t has more than 14 elements or any of them is more than 8 bit long, the API will set
io_errno to IO_E_PARM.
Arguments
from Pointer to
hw_path_t data structure.
to A pointer to the legacy
leg_hw_path_t
data structure.
Return Value
IO_SUCCESS - Upon success.
IO_ERROR - Otherwise. io_errno is set to indicate the error.
Errors
[IO_E_PARM]
libIO FUNCTION
Name
io_get_devs() - returns the
dev_ts of a given node
Synopsis
int io_get_devs(io_token_t node, io_dev_info_t *dev_arry, int *count);
Description
io_get_devs() gets all the dev_t
s (including char and block dev_ts) of a given node. It will return
all the
dev_ts, the device specific options and the dev_t type in dev_arry. The dev_type field of dev_arry
is updated to say if the
dev_t type is D_CHR (character) or D_BLK (block).
The user will need to allocate memory for the array and indicate its size (of io_dev_info_t)incount. The
interface will copy the data into the array if it is big enough. If it is too small, no data is returned and the
count is set to indicate the needed size (number of io_dev_info_t). Callers need to reallocate and call the
API again.
Arguments
node An I/O node token to retrieve its
dev_ts.
dev_arry Possible values are:
INPUT:
A pointer to an array of io_dev_info_t. The array is allocated by the caller. The initial
size can be
IO_MAX_DEVS_IN_IOQ
(this is currently set to 48).
OUTPUT:
The io_dev_info_t returned will be copied into this array.
count Possible values are:
INPUT:
Number of io_dev_info_t expected. Should be set to IO_MAX_DEVS_IN_IOQ
ini-
tially.
OUTPUT:
Number of io_dev_info_t in the returned array if the array is big enough. If the array
is not big enough:
1) No token will be returned.
2) Count will be set to the real count of io_dev_info_t to be returned.
3) The API will return
IO_ERROR.
4) io_errno will be set to IO_E_BUF_TOO_SMALL.
HP-UX 11i Version 3: February 2007 17 Hewlett-Packard Company 735