SCSI Pass-Through Programmer's Guide
2. LDEV number to I/O path Conversion
A new user callable routine (call privilege 3, execution privilege 0) is available in MPE/iX to
obtain the I/O path of a given logical device. The following are the external specifications of
this procedure:
Syntax HPLDEVTOIOPATH (ldev, iopath, status);
Parameters
• ldev (required) is of type ldev_type which is a 16 bit unsigned value (bit16). This
parameter is passed by value.
ldev_type = bit16;
• io_path (required) is of type pac32_t where pac32_t is a packed array of 32
characters. This parameter is passed by reference.
io_path = packed array[1..32] of char;
• status (required) is of type hpe_status. This status parameter is also passed by
reference.
hpe_status = record
case boolean of
true : (all : integer);
false: (status : shortint;
subsys : shortint);
end;
Operation Notes
MPE manages devices based on an I/O tree structure similar to the output of ioscan in HP-
UX. The physical path of each device establishes its hierarchy. This physical path is needed
to make SPT calls to these devices. It is easier to work with devices using their unique LDEV
number instead of their hierarchical physical path. It will be very handy for programmers to
use this user callable routine and convert an LDEV number to its corresponding physical
path.
HPLDEVTOIOPATH converts a logical device number provided in ldev to its physical path
and returns this information in the io_path parameter. The path is copied left justified into
io_path and is followed by spaces to fill the character array. Status indicates the outcome of
the conversion. A status value of zero indicates that all’s well. The call to
HPLDEVTOIOPATH should be within a TRY/RECOVER block so that escapes from the
routine are caught when the status parameter passed is invalid (fails the parameter checks)
Please see Appendix-B for a listing of programs invoking HPLDEVTOIOPATH. A snapshot
of the results is also given. This enhancement is available via patch MPENX04A for MPE/iX
release C.75.00
- 14 -