[stgt] [PATCH] Use PCODE_OFFSET

Malahal Naineni malahal at us.ibm.com
Fri Feb 12 06:13:50 CET 2010


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 at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html



More information about the stgt mailing list