aboutsummaryrefslogtreecommitdiff
path: root/lib/sg_lib.c
diff options
context:
space:
mode:
authorDouglas Gilbert <dgilbert@interlog.com>2018-03-30 17:49:57 +0000
committerDouglas Gilbert <dgilbert@interlog.com>2018-03-30 17:49:57 +0000
commita66b91ad7e4878df47af0229b19d897bff3d47c8 (patch)
treecb376edc28d2dcb852aff6ead115c34e9d95c611 /lib/sg_lib.c
parent382e35d67e18ba68f56c95b2a130d5467d2a2ccd (diff)
downloadsg3_utils-a66b91ad7e4878df47af0229b19d897bff3d47c8.tar.gz
sg_lib: add SG_LIB_LBA_OUT_OF_RANGE; sg_format: add --dry-run; sg_unmap: add --all=ST,RN[,LA] , --dry-run + --force
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@765 6180dd3e-e324-4e3e-922d-17de1ae2f315
Diffstat (limited to 'lib/sg_lib.c')
-rw-r--r--lib/sg_lib.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/sg_lib.c b/lib/sg_lib.c
index bfb95380..dcb4f478 100644
--- a/lib/sg_lib.c
+++ b/lib/sg_lib.c
@@ -1871,6 +1871,7 @@ static struct value_2names_t exit_str_arr[] = {
{18, "Medium or hardware error with Info", NULL},
{20, "No sense key", "probably additional sense code"},
{21, "Recovered error (warning)", "sense key"}, /* Warning not error */
+ {22, "LBA out of range", NULL},
{24, "Reservation conflict", "SCSI status"},
{25, "Condition met", "SCSI status"}, /* from PRE-FETCH command */
{26, "Busy", "SCSI status"}, /* more likely if SAS expander present */
@@ -2086,6 +2087,8 @@ sg_err_category_sense(const uint8_t * sbp, int sb_len)
case SPC_SK_ILLEGAL_REQUEST:
if ((0x20 == ssh.asc) && (0x0 == ssh.ascq))
return SG_LIB_CAT_INVALID_OP;
+ else if ((0x21 == ssh.asc) && (0x0 == ssh.ascq))
+ return SG_LIB_LBA_OUT_OF_RANGE;
else
return SG_LIB_CAT_ILLEGAL_REQ;
break;