aboutsummaryrefslogtreecommitdiff
path: root/src/sg_vpd.c
diff options
context:
space:
mode:
authorDouglas Gilbert <dgilbert@interlog.com>2021-07-29 02:49:07 +0000
committerDouglas Gilbert <dgilbert@interlog.com>2021-07-29 02:49:07 +0000
commitc2a103b26a80218c8c2ee9a8ddb7122e36a69331 (patch)
tree7d82843bcf1064edafd518280ede8d0e5149292e /src/sg_vpd.c
parent303f8c98ee28150285d69bd213970144fe224da3 (diff)
downloadsg3_utils-c2a103b26a80218c8c2ee9a8ddb7122e36a69331.tar.gz
sg_zones: finish initial support for REPORT ZONE DOMAINS and REPORT REALMS
Lots of clean-up based on Coverity and other code checkers. Add some new inhex folder entries to testing those new ZBC-2 commands. git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@906 6180dd3e-e324-4e3e-922d-17de1ae2f315
Diffstat (limited to 'src/sg_vpd.c')
-rw-r--r--src/sg_vpd.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/sg_vpd.c b/src/sg_vpd.c
index d5b3c3eb..36fd0de5 100644
--- a/src/sg_vpd.c
+++ b/src/sg_vpd.c
@@ -40,7 +40,7 @@
*/
-static const char * version_str = "1.64 20210610"; /* spc6r05 + sbc5r01 */
+static const char * version_str = "1.65 20210630"; /* spc6r05 + sbc5r01 */
/* standard VPD pages, in ascending page number order */
#define VPD_SUPPORTED_VPDS 0x0
@@ -1798,7 +1798,7 @@ decode_3party_copy_vpd(uint8_t * buff, int len, int do_hex, int pdt,
printf(" Held data:\n");
u = sg_get_unaligned_be32(bp + 4);
printf(" Held data limit: %u\n", u);
- ull = (1 << bp[8]);
+ ull = ((uint64_t)1 << bp[8]);
printf(" Held data granularity: %" PRIu64 "\n", ull);
break;
default:
@@ -3732,7 +3732,8 @@ svpd_examine_all(int sg_fd, struct opts_t * op)
}
if (op->do_long)
snprintf(b, sizeof(b), "[0x%x] ", k);
-
+ else
+ b[0] = '\0';
res = svpd_decode_t10(sg_fd, op, 0, 0, b);
if (SG_LIB_CAT_OTHER == res) {
res = svpd_decode_vendor(sg_fd, op, 0);