From 69c466a6c9a6dbb4b9e43a0c0e370aa4ef95a2a7 Mon Sep 17 00:00:00 2001 From: jpocas Date: Mon, 5 May 2014 14:43:58 -0400 Subject: [PATCH] - writesame10 and writesame16 were looking at the datalen, when they wanted to be looking at the number of blocks --- test-tool/iscsi-support.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test-tool/iscsi-support.c b/test-tool/iscsi-support.c index 26d04b6..92c7e72 100644 --- a/test-tool/iscsi-support.c +++ b/test-tool/iscsi-support.c @@ -4930,7 +4930,7 @@ writesame10(struct iscsi_context *iscsi, int lun, uint32_t lba, uint32_t datalen if (task->status == SCSI_STATUS_CHECK_CONDITION && task->sense.key == SCSI_SENSE_ILLEGAL_REQUEST && task->sense.ascq == SCSI_SENSE_ASCQ_INVALID_FIELD_IN_CDB) { - if (inq_bl->wsnz == 1 && datalen == 0) { + if (inq_bl->wsnz == 1 && num == 0) { logging(LOG_NORMAL, "[SKIPPED] Target does not support WRITESAME10 with NUMBER OF LOGICAL BLOCKS == 0"); scsi_free_scsi_task(task); return -3; @@ -5203,7 +5203,7 @@ writesame16(struct iscsi_context *iscsi, int lun, uint64_t lba, uint32_t datalen if (task->status == SCSI_STATUS_CHECK_CONDITION && task->sense.key == SCSI_SENSE_ILLEGAL_REQUEST && task->sense.ascq == SCSI_SENSE_ASCQ_INVALID_FIELD_IN_CDB) { - if (inq_bl->wsnz == 1 && datalen == 0) { + if (inq_bl->wsnz == 1 && num == 0) { logging(LOG_NORMAL, "[SKIPPED] Target does not support WRITESAME16 with NUMBER OF LOGICAL BLOCKS == 0"); scsi_free_scsi_task(task); return -3;