[stgt] [PATCH] Fix add_mode_page to accept pages with page data smaller than the page size
Roi Dayan
roid at mellanox.com
Sun Aug 26 15:55:22 CEST 2012
Rest of the page data will be zeroed because of how the page is allocated.
Signed-off-by: Roi Dayan <roid at mellanox.com>
---
usr/spc.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/usr/spc.c b/usr/spc.c
index 10d799e..c6d0e55 100644
--- a/usr/spc.c
+++ b/usr/spc.c
@@ -1642,7 +1642,7 @@ tgtadm_err add_mode_page(struct scsi_lu *lu, char *p)
p++;
}
- if (i != size + 3) {
+ if (i > size + 3) {
adm_err = TGTADM_INVALID_REQUEST;
eprintf("Mode Page %d (0x%02x): param_count %d != "
"MODE PAGE size : %d\n", pcode, subpcode, i, size + 3);
--
1.7.1
--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
More information about the stgt
mailing list