target/spc: Simplify INQUIRY EVPD=0x80
Signed-off-by: Christophe Vu-Brugier <cvubrugier@yahoo.fr> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
This commit is contained in:
parent
6dbe7f4e97
commit
9aff64e13f
1 changed files with 2 additions and 7 deletions
|
@ -129,15 +129,10 @@ static sense_reason_t
|
||||||
spc_emulate_evpd_80(struct se_cmd *cmd, unsigned char *buf)
|
spc_emulate_evpd_80(struct se_cmd *cmd, unsigned char *buf)
|
||||||
{
|
{
|
||||||
struct se_device *dev = cmd->se_dev;
|
struct se_device *dev = cmd->se_dev;
|
||||||
u16 len = 0;
|
u16 len;
|
||||||
|
|
||||||
if (dev->dev_flags & DF_EMULATED_VPD_UNIT_SERIAL) {
|
if (dev->dev_flags & DF_EMULATED_VPD_UNIT_SERIAL) {
|
||||||
u32 unit_serial_len;
|
len = sprintf(&buf[4], "%s", dev->t10_wwn.unit_serial);
|
||||||
|
|
||||||
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++; /* Extra Byte for NULL Terminator */
|
len++; /* Extra Byte for NULL Terminator */
|
||||||
buf[3] = len;
|
buf[3] = len;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue