[stgt] [PATCH 3/4] Fix a few spots to use PCODE_OFFSET

Andy Grover agrover at redhat.com
Fri Jan 6 01:53:55 CET 2012


Fix a few missed spots that were not converted to using PCODE_OFFSET for
the lu_vpd array.

Signed-off-by: Andy Grover <agrover at redhat.com>
---
 usr/spc.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/usr/spc.c b/usr/spc.c
index 174d4b3..584ed56 100644
--- a/usr/spc.c
+++ b/usr/spc.c
@@ -1678,12 +1678,12 @@ int lu_config(struct scsi_lu *lu, char *params, match_fn_t *fn)
 		case Opt_scsi_id:
 			match_strncpy(attrs->scsi_id, &args[0],
 				      sizeof(attrs->scsi_id));
-			lu_vpd[3]->vpd_update(lu, attrs->scsi_id);
+			lu_vpd[PCODE_OFFSET(0x83)]->vpd_update(lu, attrs->scsi_id);
 			break;
 		case Opt_scsi_sn:
 			match_strncpy(attrs->scsi_sn, &args[0],
 				      sizeof(attrs->scsi_sn));
-			lu_vpd[0]->vpd_update(lu, attrs->scsi_sn);
+			lu_vpd[PCODE_OFFSET(0x80)]->vpd_update(lu, attrs->scsi_sn);
 			break;
 		case Opt_vendor_id:
 			match_strncpy(attrs->vendor_id, &args[0],
-- 
1.7.1

--
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