Returns the SCSI ID and Logical Unit Number (LUN) from a SCSI address.
#include <diag/diag.h> int diag_get_sid_lun ( scsiaddr, sid_addr, lun_addr ) char *scsiaddr; uchar *sid_addr; uchar *lun_addr;
The diag_get_sid_lun subroutine returns the SCSI ID and logical unit number associated with a SCSI address for a device. The SCSI address must be in the format used by the connwhere field in CuDv object class.
Parameter | Description |
---|---|
scsiaddr | Pointer to the address of the SCSI device. This is the connwhere field of the device. Format is "x,y" where x is the SCSI ID, and y is the logical unit number. |
sid_addr | Pointer to the SCSI ID of the device. |
lun_addr | Pointer to the logical unit number of the device. |
The diag_get_sid_lun subroutine returns one of the following values:
Return Value | Description |
---|---|
0 | Successful return. |
-1 | Error. Incorrect format for SCSI address. |