aboutsummaryrefslogtreecommitdiff
path: root/src/sg_vpd_vendor.c
diff options
context:
space:
mode:
authorDouglas Gilbert <dgilbert@interlog.com>2019-02-06 23:24:46 +0000
committerDouglas Gilbert <dgilbert@interlog.com>2019-02-06 23:24:46 +0000
commitd491f4c710d6d1d123d421eb0ba7aeddee9cf7d7 (patch)
treeef74075454c2237144874f57bdb21cae709b7631 /src/sg_vpd_vendor.c
parent04adb7f5027fb9f8b4368e4eaa561e14591bb1a7 (diff)
downloadsg3_utils-d491f4c710d6d1d123d421eb0ba7aeddee9cf7d7.tar.gz
sg_logs+sg_vpd: tweaks for WDC SSD; sgh_dd add oflag=swait
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@810 6180dd3e-e324-4e3e-922d-17de1ae2f315
Diffstat (limited to 'src/sg_vpd_vendor.c')
-rw-r--r--src/sg_vpd_vendor.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/sg_vpd_vendor.c b/src/sg_vpd_vendor.c
index 99325c94..66be0729 100644
--- a/src/sg_vpd_vendor.c
+++ b/src/sg_vpd_vendor.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2018 Douglas Gilbert.
+ * Copyright (c) 2006-2019 Douglas Gilbert.
* All rights reserved.
* Use of this source code is governed by a BSD-style
* license that can be found in the BSD_LICENSE file.
@@ -1378,9 +1378,18 @@ decode_vpd_d2_hit(uint8_t * b, int blen)
plen + 4, 52 + 4);
return;
}
- printf(" ASCII HDC Version: %.16s\n", b + 5);
- printf(" ASCII Card Serial Number: %.16s\n", b + 22);
- printf(" ASCII Card Assembly Part Number: %.16s\n", b + 39);
+ if ((blen - 4) == 120) {
+ printf(" HDC Version: %.*s\n", b[4], b + 5);
+ printf(" Card Serial Number: %.*s\n", b[24], b + 25);
+ printf(" NAND Flash Version: %.*s\n", b[44], b + 45);
+ printf(" Card Assembly Part Number: %.*s\n", b[64], b + 65);
+ printf(" Second Card Serial Number: %.*s\n", b[84], b + 85);
+ printf(" Second Card Assembly Part Number: %.*s\n", b[104], b + 105);
+ } else {
+ printf(" ASCII HDC Version: %.16s\n", b + 5);
+ printf(" ASCII Card Serial Number: %.16s\n", b + 22);
+ printf(" ASCII Card Assembly Part Number: %.16s\n", b + 39);
+ }
}
/* Returns 0 if successful, see sg_ll_inquiry() plus SG_LIB_CAT_OTHER for