Using the HP-UX libIO Library
exit(1);
}
printf("\nChild of \"ext_bus\" I/O node %s \n",
my_string1);
}
strcpy(my_string1," ");
if (io_get_node_relation(node, IO_REL_SIBLING, 1,
&relative2)==IO_ERROR) {
io_error("ERROR:io_get_node_relationIO_REL_SIBLING");
exit(1) ;
} else {
if (io_query (relative2, S_IOTREE_EXT, "hw_path",
&hw_path1)==IO_ERROR) {
io_error("ERROR:io_query");
exit(1);
}
if (io_hw_path_to_str(my_string1,
&hw_path1)==IO_ERROR) {
io_error("io_hw_path_to_str");
exit(1);
}
printf("\n Sibling of \"ext_bus\" I/O node %s \n",
my_string1);
}
/*end of libio operations */
io_end();
}
Output
I/O node Hardware Path
----------------------------------------
"ext_bus" class I/O node 0/0/3/0.0
Parent of "ext_bus" I/O node 0/0/3/0
Child of "ext_bus" I/O node 0/0/3/0.0.0x0
Sibling of "ext_bus" I/O node 0/0/3/0.1