[PATCH] Fix add_mode_page to accept pages with page data smaller than the page size

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Rest of the page data will be zeroed because of how the page is allocated.

Signed-off-by: Roi Dayan <roid@xxxxxxxxxxxx>
---
 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@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux SCSI]     [Linux RAID]     [Linux Clusters]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]

  Powered by Linux