typedef struct my_scsi_idlun { int four_in_one; /* 4 separate bytes of info compacted into 1 int */ int host_unique_id; /* distinguishes adapter cards from same supplier */ } My_scsi_idlun; |
(scsi_device_id | (lun << 8) | (channel << 16) | (host_no << 24)) |
The advantage of this ioctl() is that it can be called on any SCSI file descriptor.