HP-UX Reference (11i v3 07/02) - 3 Library Functions A-M (vol 6)
l
libIO(3X) libIO(3X)
[IO_E_BUF_TOO_SMALL]
libIO FUNCTION
Name
io_new_to_legacy_devs()
- maps an agile
dev_t to one or more legacy dev_t(s)
Synopsis
int io_new_to_legacy_devs(dev_t new_dev, int dev_type, dev_t *dev_arry,
int *count);
Description
This API maps an agile dev_t to its legacy
dev_t(s). There can be one to many mappings.
Arguments
new_dev A pointer to the agile
dev_t
to obtain its corresponding legacy dev_t
s.
dev_type Possible values are:
D_CHR Character dev_t.
D_BLK Block dev_t.
dev_arry Possible values are:
INPUT:
A pointer to an array of legacy dev_ts. The array is allocated by the caller with a
recommended initial size of:
(IO_MAX_DEVS_IN_IOQ * sizeof (dev_t))
OUTPUT:
The dev_ts returned will be copied into this array.
count Possible values are:
INPUT:
Number of legacy dev_ts expected (recommended MAX_DEVS_IN_IOQ
(48)).
OUTPUT:
Number of legacy dev_ts in the returned array. If the array is not big enough:
1) No token will be returned.
2) Count will be set to the real count of dev_t to be returned.
3) The API will return
IO_ERROR.
4) io_errno will be set to IO_E_BUF_TOO_SMALL
.
In this case, the caller needs to allocate a bigger buffer after recalculating it
using:
(sizeof (dev_t)*count)
with the returned count value. and needs to call the API again with the new
buffer and count values.
Return Value
IO_SUCCESS - Upon success.
IO_ERROR - Otherwise. io_errno is set to indicate the error.
Errors
[IO_E_DCONF_OPEN]
[IO_E_PARM]
[IO_E_DCONF_ACCESS]
[IO_E_SYSCALL]
[IO_E_BUF_TOO_SMALL]
[IO_E_MEM_ALLOC]
HP-UX 11i Version 3: February 2007 − 21 − Hewlett-Packard Company 739