diff options
author | Douglas Gilbert <dgilbert@interlog.com> | 2022-05-06 01:27:03 +0000 |
---|---|---|
committer | Douglas Gilbert <dgilbert@interlog.com> | 2022-05-06 01:27:03 +0000 |
commit | 3e056f675f51f14a5209efe1b491ba897e7873ce (patch) | |
tree | 8843997030eac9382a2d817c44b96a5cbe2d391f /src/sg_inq.c | |
parent | d7f5140b8b84eb9e27509a1c0fb6872a782b1fe8 (diff) | |
download | sg3_utils-3e056f675f51f14a5209efe1b491ba897e7873ce.tar.gz |
sg_inq: add support for Hitachi/HP open-v ldev names; sg_rep_zone: more json work
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@951 6180dd3e-e324-4e3e-922d-17de1ae2f315
Diffstat (limited to 'src/sg_inq.c')
-rw-r--r-- | src/sg_inq.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/sg_inq.c b/src/sg_inq.c index 92333975..8e3b8c6f 100644 --- a/src/sg_inq.c +++ b/src/sg_inq.c @@ -51,7 +51,7 @@ #include "sg_pt_nvme.h" #endif -static const char * version_str = "2.16 20220217"; /* spc6r06 */ +static const char * version_str = "2.17 20220504"; /* spc6r06 */ /* INQUIRY notes: * It is recommended that the initial allocation length given to a @@ -2029,7 +2029,7 @@ decode_softw_inf_id(uint8_t * buff, int len, int do_hex) buff += 4; for ( ; len > 5; len -= 6, buff += 6) printf(" IEEE identifier: 0x%" PRIx64 "\n", - sg_get_unaligned_be48(buff + 0)); + sg_get_unaligned_be48(buff + 0)); } /* VPD_ATA_INFO [0x89] */ @@ -2928,6 +2928,16 @@ std_inq_decode(const struct opts_t * op, int act_len) } else printf(" Vendor specific: %s\n", xtra_buff); } + if (op->do_vendor && (act_len > 243) && + (0 == strncmp("OPEN-V", (const char *)&rp[16], 6))) { + memcpy(xtra_buff, &rp[212], 32); + if (op->do_export) { + len = encode_whitespaces((uint8_t *)xtra_buff, 32); + if (len > 0) + printf("VENDOR_SPECIFIC_OPEN-V_LDEV_NAME=%s\n", xtra_buff); + } else + printf(" Vendor specific OPEN-V LDEV Name: %s\n", xtra_buff); + } } if (! op->do_export) { if ((0 == op->resp_len) && usn_buff[0]) |