>From 1cf2289d1b38d1edddd9fe8f3e242f5b912d9d7a Mon Sep 17 00:00:00 2001
From: Ronnie Sahlberg <[EMAIL PROTECTED]>
Date: Fri, 2 May 2008 22:31:07 +1000
Subject: [PATCH 1/7] modesense10 length too small by one byte
fix a bug in the mode sense 10 data where the length is one byte too small
Signed-off-by: Ronnie Sahlberg <[EMAIL PROTECTED]>
---
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
_______________________________________________
Stgt-devel mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/stgt-devel