Using the HP-UX libIO Library

exit(1);
}
printf("IO_LUNPATH_2_LUN MAPPING\n-----------------------
-\n");
printf("%s maps %s \n\n",my_string, my_string1);
/*IO__LUN_2_LUNPATH Mapping */
token_array1=(io_token_t*)malloc(sizeof(io_token_t));
ret=io_get_mapping(token_array[0], IO_LUN_2_LUNPATH,
&count,token_array1);
if (ret==IO_E_MEM_ALLOC) {
token_array1=(io_token_t*)
malloc(count*sizeof(io_token_t));
ret=io_get_mapping(token_array[0], IO_LUN_2_LUNPATH,
&count, token_array1);
}
if (ret != IO_SUCCESS) {
io_error("ERROR:io_get_mapping:");
exit(1);
}
if (io_query (token_array1[0], S_IOTREE, "hw_path",
&hw_path1)==IO_ERROR ) {
io_error("ERROR:io_query");
exit(1);
}
if (io_hw_path_to_str(my_string, &hw_path1)==IO_ERROR) {
io_error("io_hw_path_to_str");
exit(1);
}
printf("IO_LUN_2_LUNPATH MAPPING\n-----------------------
-\n");
printf("%s maps %s \n\n",my_string1, my_string);
/*Terminate the connection */
io_end();
}
Output
IO_LEGACY_2_NEW MAPPING
------------------------
1/0/0/3/0.6.0 maps 1/0/0/3/0.0x6.0x0
IO_NEW_2_LEGACY MAPPING
------------------------