From 7144ac65deef1369c1c754c2e561c813878ab046 Mon Sep 17 00:00:00 2001 From: Douglas Gilbert Date: Tue, 31 Aug 2021 21:15:38 +0000 Subject: sg_get_elem_status: fix issue with '--maxlen=' option, add 2 depopulation revocation health attributes [sbc5r01] git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@911 6180dd3e-e324-4e3e-922d-17de1ae2f315 --- src/sg_get_elem_status.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/sg_get_elem_status.c') diff --git a/src/sg_get_elem_status.c b/src/sg_get_elem_status.c index 94f1813e..61533c7b 100644 --- a/src/sg_get_elem_status.c +++ b/src/sg_get_elem_status.c @@ -37,7 +37,7 @@ * given SCSI device. */ -static const char * version_str = "1.05 20210830"; /* sbc4r19 */ +static const char * version_str = "1.06 20210831"; /* sbc5r01 */ #ifndef UINT32_MAX @@ -295,7 +295,7 @@ main(int argc, char * argv[]) } if (0 == maxlen) maxlen = DEF_GPES_BUFF_LEN; - else if (n < MIN_MAXLEN) { + else if (maxlen < MIN_MAXLEN) { pr2serr("Warning: --maxlen=LEN less than %d ignored\n", MIN_MAXLEN); maxlen = DEF_GPES_BUFF_LEN; @@ -550,8 +550,12 @@ start_response: printf("at manufacturer's specification limits <%d>", j); else if (j < 0xd0) printf("outside manufacturer's specification limits <%d>", j); - else if (j < 0xfd) + else if (j < 0xfb) printf("reserved [0x%x]", j); + else if (0xfb == j) + printf("depopulation revocation completed, errors detected"); + else if (0xfc == j) + printf("depopulation revocation in progress"); else if (0xfd == j) printf("depopulation completed, errors detected"); else if (0xfe == j) -- cgit v1.2.3