[PATCH 1/7] modesense10 length too small by one byte
Ronnie Sahlberg
ronniesahlberg
Fri May 2 14:31:07 CEST 2008
fix a bug in the mode sense 10 data where the length is one byte too small
Signed-off-by: Ronnie Sahlberg <ronniesahlberg at gmail.com>
---
usr/spc.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/usr/spc.c b/usr/spc.c
index cf2e504..e3e4d98 100644
--- a/usr/spc.c
+++ b/usr/spc.c
@@ -419,7 +419,7 @@ int spc_mode_sense(int host_no, struct scsi_cmd *cmd)
data[0] = len - 1;
data[3] = dbd ? 0 : BLOCK_DESCRIPTOR_LEN;
} else {
- *(uint16_t *)(data) = __cpu_to_be16(len - 3);
+ *(uint16_t *)(data) = __cpu_to_be16(len - 2);
data[7] = dbd ? 0 : BLOCK_DESCRIPTOR_LEN;
}
--
1.5.5
More information about the stgt
mailing list