diff options
author | Douglas Gilbert <dgilbert@interlog.com> | 2021-08-31 21:15:38 +0000 |
---|---|---|
committer | Douglas Gilbert <dgilbert@interlog.com> | 2021-08-31 21:15:38 +0000 |
commit | 7144ac65deef1369c1c754c2e561c813878ab046 (patch) | |
tree | 22ce45fa81c96651d7e3e32a426e516d882493b6 /src/sg_get_elem_status.c | |
parent | d4485d5b472462f2ee34bb18f1cef77d2c883b8e (diff) | |
download | sg3_utils-7144ac65deef1369c1c754c2e561c813878ab046.tar.gz |
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
Diffstat (limited to 'src/sg_get_elem_status.c')
-rw-r--r-- | src/sg_get_elem_status.c | 10 |
1 files changed, 7 insertions, 3 deletions
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) |