Using the HP-UX libIO Library

} else if (io_query(node, S_IOTREE, "is_block",
&is_block) == IO_SUCCESS) dev_type = D_BLK;
/* try out io_mkdev() */
if (io_mkdev(node, dev_type, "s0", &dev) != IO_SUCCESS) {
io_error("ERROR:io_mkdev:options:s0");
exit(1);
}
if (dev_type == D_CHR) {
ret=devnm(S_IFCHR,dev,dsf_path,
sizeof(dsf_path), 1);
if (ret != 0) {
printf("devnm failed \n");
exit(1);
}
ret=io_legacy_to_new_dsf(dsf_path,retrieved_new_dsf);
if(ret == IO_ERROR)
io_error("ERROR:io_legacy_to_new_dsf");
exit(1);
} else {
printf("\nLegacy Special File Persistent Special
File\n" );
printf("=====================
=================\n");
printf("%s %s\n", dsf_path,
retrieved_new_dsf);
}
}
/*terminate libio operations */
io_end();
}
Output
Legacy Special File Persistent Special File
===================== ======================
/dev/rdsk/c0t6d0 /dev/rdisk/disk25