Using the HP-UX libIO Library
}
if (io_query (node, S_IOTREE_EXT, "hw_path",
&hw_path)==IO_ERROR) {
io_error("ERROR:io_query");
exit(1);
}
if (io_hw_path_to_str(my_string, &hw_path)==IO_ERROR) {
io_error("io_hw_path_to_str");
exit(1);
}
if (io_get_node_relation(node,IO_REL_PARENT,0,&relative)
==IO_ERROR) {
io_error("ERROR:io_get_node_relation IO_REL_PARENT
");
exit(1);
} else {
if (io_query (relative, 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 I/O node Hardware Path \n" );
printf("----------------------------------------\n\n");
printf(" \"ext_bus\" class I/O node" );
printf("%s \n Parent of \"ext_bus\" I/O node %s\n ",
my_string, my_string1);
relative1=(io_token_t)NULL;
strcpy(my_string1," ");
if (io_get_node_relation(node, IO_REL_CHILD, 0,
&relative1)==IO_ERROR) {
io_error("ERROR:io_get_node_relation IO_REL_CHILD");
exit(1);
} else {
if (io_query (relative1, 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");