libIO.3x (2010 09)
l
libIO(3X) libIO(3X)
Description
This API accepts a hardware path in string format and determines whether it is a legacy path or agile
hardware path.
Arguments
path A pointer to a string representing a hardware path.
Return Value
IO_HWPATH_NEW - If the path is an agile path.
IO_HWPATH_LEGACY
- If the path is a legacy path.
IO_ERROR - Otherwise. io_errno is set to indicate the error.
Errors
[IO_E_DCONF_OPEN]
[IO_E_PARM]
[IO_E_SYSCALL]
[IO_E_PATH_STR]
[IO_E_NODE_NOEXIST]
libIO FUNCTION
Name
io_get_node_relation()
- retrieves a relative of a given node token
Synopsis
int io_get_node_relation(io_token_t node, int relationship,
uint64_t addr, io_token_t *relative);
Description
This API is called to get the relative of the I/O node specified by node. The parameter relationship indi-
cates what kind of relative. Valid values are:
•
IO_REL_CHILD
• IO_REL_PARENT
• IO_REL_SIBLING
The node token of the relative is returned in the parameter relative . If either IO_REL_CHILD
or
IO_REL_SIBLING is specified, then the parameters addr and relative can be used to specify which child
or sibling.
If the parameter relative is NULL, then addr is used to identify a particular child or sibling.
If the parameter relative is not NULL, then the parameter addr is ignored, and if relative == node, the
first child or sibling is returned, otherwise the next child or sibling after the one identified by relative is
returned.
Arguments
node The token of the I/O node.
relationship What relative to look for:
IO_REL_CHILD Look for a child node.
IO_REL_PARENT Look for the parent node.
IO_REL_SIBLING Look for a sibling.
addr The (optional) address of the relative if child or sibling relative to the parent.
relative Either NULL or the handle of the last relative found.
Note that NULL means the relative pointer is pointing to a NULL. It does not
mean a NULL pointer.
Return Value
IO_SUCCESS - Upon success.
IO_ERROR - Otherwise. io_errno is set to indicate the error.
16 Hewlett-Packard Company − 16 − HP-UX 11i Version 3: September 2010