projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6dbe7f4
)
target/spc: Simplify INQUIRY EVPD=0x80
author
Christophe Vu-Brugier
<
[email protected]
>
Fri, 6 Jun 2014 15:15:15 +0000
(17:15 +0200)
committer
Nicholas Bellinger
<
[email protected]
>
Fri, 6 Jun 2014 21:21:00 +0000
(14:21 -0700)
Signed-off-by: Christophe Vu-Brugier <
[email protected]
>
Signed-off-by: Nicholas Bellinger <
[email protected]
>
drivers/target/target_core_spc.c
patch
|
blob
|
history
diff --git
a/drivers/target/target_core_spc.c
b/drivers/target/target_core_spc.c
index 8653666612a802f5cbfcde2c4d82ac7d20ca9294..17b5b7e099fa2d80083e9c3f2261cae0cf2bc8aa 100644
(file)
--- a/
drivers/target/target_core_spc.c
+++ b/
drivers/target/target_core_spc.c
@@
-129,15
+129,10
@@
static sense_reason_t
spc_emulate_evpd_80(struct se_cmd *cmd, unsigned char *buf)
{
struct se_device *dev = cmd->se_dev;
- u16 len
= 0
;
+ u16 len;
if (dev->dev_flags & DF_EMULATED_VPD_UNIT_SERIAL) {
- u32 unit_serial_len;
-
- unit_serial_len = strlen(dev->t10_wwn.unit_serial);
- unit_serial_len++; /* For NULL Terminator */
-
- len += sprintf(&buf[4], "%s", dev->t10_wwn.unit_serial);
+ len = sprintf(&buf[4], "%s", dev->t10_wwn.unit_serial);
len++; /* Extra Byte for NULL Terminator */
buf[3] = len;
}