HP-UX Reference (11i v3 07/02) - 3 Library Functions A-M (vol 6)
l
libIO(3X) libIO(3X)
D_CHR Character dev_t.
D_BLK Block dev_t.
options Device specific options.
dev The created dev_t is stored in memory pointed to by dev.
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_NODE_NOEXIST]
[IO_E_FUNC_NOT_SUPPORTED]
libIO FUNCTION
Name
io_dev_to_options()
- returns the device options of a given dev_t and dev_type
Synopsis
int io_dev_to_options(dev_t dev, int dev_type, uint64_t *options);
Description
Given dev_t and dev_type , io_dev_to_options()
returns its device options in a uint64_t bit
mask format.
Arguments
dev
dev_t value to retrieve the device options.
dev_type Possible values are:
D_CHR Character dev_t.
D_BLK Block dev_t.
options Unsigned 64-bit mask representing the device options is stored in the location pointed to
by options.
Return Value
IO_SUCCESS - Upon success.
IO_ERROR - Failure. io_errno is set to indicate the error.
Errors
[IO_E_DCONF_OPEN]
[IO_E_PARM]
[IO_E_DCONF_ACCESS]
[IO_E_SYSCALL]
libIO FUNCTION
Name
io_is_legacy_dev() - determines if the given dev_t is legacy
Synopsis
int io_is_legacy_dev(dev_t dev, int dev_type);
Description
This API determines if the given dev_t is a legacy or an agile dev_t. While checking if a given device
special file is persistent or legacy, issue a stat() call on the device special file and pass st_rdev (see
stat(2)) to this API. The device special file is of persistent type if the API returns IO_TOKEN_NEW and
the file is of legacy type if the API returns IO_TOKEN_LEGACY.
730 Hewlett-Packard Company − 12 − HP-UX 11i Version 3: February 2007