[PATCH] Use PCODE_OFFSET

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

 



diff -r 5d646ecba14a -r 9ddfd92ebb6d usr/spc.c
--- a/usr/spc.c	Thu Feb 11 21:08:48 2010 -0800
+++ b/usr/spc.c	Thu Feb 11 21:10:47 2010 -0800
@@ -111,7 +111,7 @@
 
 static void update_vpd_80(struct scsi_lu *lu, void *sn)
 {
-	struct vpd *vpd_pg = lu->attrs.lu_vpd[0];
+	struct vpd *vpd_pg = lu->attrs.lu_vpd[PCODE_OFFSET(0x80)];
 	char *data = (char *)vpd_pg->data;
 
 	memset(data, 0x20, vpd_pg->size);
@@ -129,7 +129,7 @@ static void update_vpd_80(struct scsi_lu
 
 static void update_vpd_83(struct scsi_lu *lu, void *id)
 {
-	struct vpd *vpd_pg = lu->attrs.lu_vpd[3];
+	struct vpd *vpd_pg = lu->attrs.lu_vpd[PCODE_OFFSET(0x83)];
 	uint8_t	*data = vpd_pg->data;
 
 	data[0] = INQ_CODE_ASCII;
--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux SCSI]     [Linux RAID]     [Linux Clusters]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]

  Powered by Linux