HP-UX Reference (11i v3 07/02) - 3 Library Functions A-M (vol 6)
l
libIO(3X) libIO(3X)
if (io_init(O_RDWR) == -1) exit(1);
io_str_to_hw_path(str_path, &hw_path);
io_end();
exit(0);
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_PATH_STR]
[IO_E_SYSCALL]
libIO FUNCTION
Name
io_is_option_set()
- determines if the option(s) is set for dev_t
Synopsis
int io_is_option_set(dev_t dev, int dev_type, char *options);
Description
io_is_option_set()
calls io_mkdev() with and without options to generate option mask. Mask is
then bitwise "ANDed" with dev argument and the boolean result is returned. This routine does not distin-
guish between one or more options set or multi-bit options.
Arguments
dev
dev_t to check for option settings.
dev_type Possible values are:
D_CHR Character dev_t.
D_BLK Block dev_t.
options NULL terminated string indicating device specific options.
Return Value
1 - If one or more of specified options set.
IO_ERROR -Otherwise.
Errors
None.
libIO FUNCTION
Name
io_mkdev() - builds a dev_t, given a node and option string
Synopsis
int io_mkdev(io_token_t node,int dev_type,char *options,dev_t *dev);
Description
io_mkdev() builds a dev_t pointed to by dev from the given node and options.
Arguments
node Token corresponding to an I/O tree node.
dev_type Possible values are:
D_CHR Character dev_t.
D_BLK Block dev_t.
dev Pointer to dev_t.
HP-UX 11i Version 3: February 2007 − 7 − Hewlett-Packard Company 725