libIO.3x (2010 09)
l
libIO(3X) libIO(3X)
Arguments
path1 , path2 Pointers to
hw_path_t structures.
Return Value
IO_SUCCESS - If found equivalent.
IO_ERROR - Not equivalent.
Errors
[IO_E_DCONF_ACCESS]
[IO_E_DCONF_OPEN]
[IO_E_NODE_NOEXIST]
[IO_E_PARM]
[IO_E_SYSCALL]
libIO FUNCTION
Name
io_hw_path_to_node()
- converts a hardware path to token
Synopsis
io_token_t io_hw_path_to_node(hw_path_t *hw_path);
Description
io_hw_path_to_node()
returns the token for the specified hardware path.
Arguments
hw_path Pointer to hardware path.
Return Value
Token - Upon success.
NULL - Otherwise.
io_errno is set to indicate the error.
Errors
[IO_E_DCONF_ACCESS]
[IO_E_DCONF_OPEN]
[IO_E_NODE_NOEXIST]
[IO_E_PARM]
[IO_E_SYSCALL]
libIO FUNCTION
Name
io_hw_path_to_str()
- converts a hardware path to a string
Synopsis
int io_hw_path_to_str(char *str,hw_path_t *hw_path);
Description
io_hw_path_to_str() converts the hardware path specified by hw_path to the string pointed to by
str . str must have enough space (maximum hardware path length - MAX_HW_PATH_STR) to hold the
converted string. If str is NULL, then no data is transferred, and the length of the string is returned
instead.
Arguments
str Pointer to string representing hardware path.
hw_path Input hardware path structure.
Example
The following prints the hardware path of the I/O tree node represented by
my_node:
hw_path_t hw_path;
char my_string[MAX_HW_PATH_STR];
if (io_init(O_RDWR) == -1) exit(1);
io_node_to_hw_path(my_node,&hw_path);
io_hw_path_to_str(my_string,&hw_path);
6 Hewlett-Packard Company − 6 − HP-UX 11i Version 3: September 2010