Re: [PATCH RFC] more struct scsi_lun

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Stefan Richter wrote:
I wrote:

       for (i = 0; i < 8; ++i)
               sprintf(s+2*i, %02x, lun[i]);

                 sprintf(s+2*i, "%02x", lun.scsi_lun[i]);
#-)


There is obviously room for improvement. Any naive representation is sub-optimal, be it for small luns (my current code) or larger luns (your example).

For situations with smaller luns, we should probably continue to use the current scsilun_to_int() conversion, while using your example for larger luns, i.e.

	if (upper 4 bytes zero)
		scsilun to int
		printk %d
	else
		for each byte
			printk %x

But Douglas's code suggested that if we are more motivated, we could provide an even better representation.

Regards,

	Jeff



-
: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux