Using the HP-UX libIO Library
The routine returns:
• IO_HWPATH_LEGACY(1) - for legacy
• IO_HWPATH_NEW(0) - for agile
• IO_ERROR() - for failure
io_legacy_to_new_hwpath()
This routine converts the data structure of a pre-HP-UX11i v3 hardware path to the
HP-UX 11i v3 (or later) hardware path. The function prototype for this routine is:
int io_legacy_to_new_hwpath (leg_hw_path_t *from,
hw_path_t *to);
io_new_to_legacy_hwpath()
This routine converts a hardware path data structure used on HP-UX 11i v3 (or later)
to the pre-HP-UX 11i v3 hardware path. If hw_path_t has more than 14 elements,
or any elements are more than 8 bit long, the routine will set io_errno to
IO_E_PARM. The function prototype for this routine is:
int io_new_to_legacy_hwpath (hw_path_t *from,
leg_hw_path_t *to);
io_init_hw_path()
This routine initializes the hardware path structure hw_path_t according to the
specified flags argument. IO_TREE_LEGACY should be passed as flags value while
initializing a legacy hardware path. Zero can be passed as flags value for all other
cases. The function prototype for this routine is:
int io_init_hw_path(hw_path_t *hw_path, int flags);
io_hw_compare()
This routine compares two pre-HP-UX 11i v3 hardware path structures. If they are
equivalent, it returns success. Otherwise, it returns an error. The function prototype
for this routine is:
int io_hw_compare(leg_hw_path_t *path1,
leg_hw_path_t *path2);