Re: [PATCH RFC] more struct scsi_lun

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

 



Jeff Garzik wrote:
+static inline char *scsilun_to_str(const struct scsi_lun *lun, char *s)
 {
-	sprintf(s, "%d", scsilun_to_int(&sdev->lun));
+	sprintf(s, "%d", scsilun_to_int(lun));
 	return s;
 }

What about an 8-byte representation?

#define SCSILUN_STR_LEN (2*8+1)

static inline char *scsilun_to_str(const struct scsi_lun *lun, char *s)
{
	int i;

	for (i = 0; i < 8; ++i)
		sprintf(s+2*i, %02x, lun[i]);
	return s;
}
--
Stefan Richter
-=====-=-=-= =-=- =-===
http://arcgraph.de/sr/
-
: 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