aboutsummaryrefslogtreecommitdiff
path: root/lib/sg_lib.c
diff options
context:
space:
mode:
authorDouglas Gilbert <dgilbert@interlog.com>2018-09-11 23:13:21 +0000
committerDouglas Gilbert <dgilbert@interlog.com>2018-09-11 23:13:21 +0000
commit23b8f9c3a44e6be249911b97c4cf02da601be519 (patch)
treed475856169c8a08001e1f8813408ed71bdc14197 /lib/sg_lib.c
parent38a3773e8ef84bd18fcf266df4e697e431c73882 (diff)
downloadsg3_utils-23b8f9c3a44e6be249911b97c4cf02da601be519.tar.gz
sg_vpd: decode some WDC/Hitachi vendor VPD pages; sg_modes: accept acronym for page/subpage codes; attempted 1.43 release
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@789 6180dd3e-e324-4e3e-922d-17de1ae2f315
Diffstat (limited to 'lib/sg_lib.c')
-rw-r--r--lib/sg_lib.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/sg_lib.c b/lib/sg_lib.c
index 3e67fda3..c2c58916 100644
--- a/lib/sg_lib.c
+++ b/lib/sg_lib.c
@@ -1334,7 +1334,10 @@ sg_get_sense_descriptors_str(const char * lip, const uint8_t * sbp,
switch (descp[0]) {
case 0:
n += sg_scnpr(b + n, blen - n, "Information: ");
- if ((add_d_len >= 10) && (0x80 & descp[2])) {
+ if (add_d_len >= 10) {
+ if (! (0x80 & descp[2]))
+ n += sg_scnpr(b + n, blen - n, "Valid=0 (-> vendor "
+ "specific) ");
n += sg_scnpr(b + n, blen - n, "0x");
for (j = 0; j < 8; ++j)
n += sg_scnpr(b + n, blen - n, "%02x", descp[4 + j]);