aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/target
diff options
context:
space:
mode:
authorChristophe Vu-Brugier <cvubrugier@yahoo.fr>2014-06-06 11:15:15 -0400
committerNicholas Bellinger <nab@linux-iscsi.org>2014-06-06 17:21:00 -0400
commit9aff64e13f3678015c4a08a4fbf320b3a65b5cf1 (patch)
treec527bc4b589fe9e80f3673d4cc6a84bf747ce84f /drivers/target
parent6dbe7f4e97d55eefcb471c41c16b62fca5f10c68 (diff)
target/spc: Simplify INQUIRY EVPD=0x80
Signed-off-by: Christophe Vu-Brugier <cvubrugier@yahoo.fr> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target')
-rw-r--r--drivers/target/target_core_spc.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/target/target_core_spc.c b/drivers/target/target_core_spc.c
index 8653666612a8..17b5b7e099fa 100644
--- a/drivers/target/target_core_spc.c
+++ b/drivers/target/target_core_spc.c
@@ -129,15 +129,10 @@ static sense_reason_t
129spc_emulate_evpd_80(struct se_cmd *cmd, unsigned char *buf) 129spc_emulate_evpd_80(struct se_cmd *cmd, unsigned char *buf)
130{ 130{
131 struct se_device *dev = cmd->se_dev; 131 struct se_device *dev = cmd->se_dev;
132 u16 len = 0; 132 u16 len;
133 133
134 if (dev->dev_flags & DF_EMULATED_VPD_UNIT_SERIAL) { 134 if (dev->dev_flags & DF_EMULATED_VPD_UNIT_SERIAL) {
135 u32 unit_serial_len; 135 len = sprintf(&buf[4], "%s", dev->t10_wwn.unit_serial);
136
137 unit_serial_len = strlen(dev->t10_wwn.unit_serial);
138 unit_serial_len++; /* For NULL Terminator */
139
140 len += sprintf(&buf[4], "%s", dev->t10_wwn.unit_serial);
141 len++; /* Extra Byte for NULL Terminator */ 136 len++; /* Extra Byte for NULL Terminator */
142 buf[3] = len; 137 buf[3] = len;
143 } 138 }