A recent posting on the SANE newsgroup reported the "scsi_info"
program failing. A cause for this failure on a recent 2.3 series
kernel is that the SCSI_IOCTL_GET_IDLUN ioctl made available
by the SCSI mid-level code (and hence to all scsi device
file descriptors) has changed. The cdrecord application is
also effected by this change.
Here is a recent description of that ioctl:
> SCSI_IOCTL_GET_IDLUN:
> This ioctl takes a pointer to a "struct scsi_idlun" object as its third
> argument. The "struct scsi_idlun" definition is found in <scsi/scsi.h>.
> It gets populated with scsi host, channel, device id and lun data for the
> given device. Unfortunately that header file "hides" that structure behind a
> "#ifdef __KERNEL__" block. To use this, that structure needs to be
> replicated in the user's program. Something like:
> 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;
> "four_in_one" is made up as follows:
> (scsi_device_id | (lun << 8) | (channel << 16) | (host_no << 24))
> These 4 components are assumed (or masked) to be 1 byte each.
>
> The 'host_no' element is a change in lk 2.3/2.4 kernels. [In the lk 2.2
> series and prior it was 'low_inode & 0xff' of the /proc pseudo file system
> entry corresponding to the adapter/host.] This change makes the use of the
> SCSI_IOCTL_GET_BUS_NUMBER ioctl superfluous.
Doug Gilbert
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]