[stgt] [PATCH] Return 'MEDIUM FORMAT CORRUPT' on header read failure

Mark Harvey markh794 at gmail.com
Tue Oct 13 21:53:48 CEST 2009


>From d1f4b9ff8e67b8da1245125a4f0345dce1682d95 Mon Sep 17 00:00:00 2001
From: Mark Harvey <markh794 at gmail.com>
Date: Wed, 14 Oct 2009 06:50:02 +1100
Subject: Return MEDIUM_FORMAT_CORRUPT on failure to read next blk header

Signed-off-by: Mark Harvey <markh794 at gmail.com>
---
 usr/bs_ssc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/usr/bs_ssc.c b/usr/bs_ssc.c
index b2ad7c7..7d71433 100644
--- a/usr/bs_ssc.c
+++ b/usr/bs_ssc.c
@@ -357,7 +357,7 @@ static int resp_var_read(struct scsi_cmd *cmd, uint8_t *buf, uint32_t length,
 
 	ret = skip_next_header(cmd->dev);
 	if (ret) {
-		sense_data_build(cmd, MEDIUM_ERROR, ASC_READ_ERROR);
+		sense_data_build(cmd, MEDIUM_ERROR, ASC_MEDIUM_FORMAT_CORRUPT);
 		result = SAM_STAT_CHECK_CONDITION;
 	}
 out:
-- 
1.6.0.4



--
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