aboutsummaryrefslogtreecommitdiff
path: root/src/sg_format.c
diff options
context:
space:
mode:
authorDouglas Gilbert <dgilbert@interlog.com>2019-09-17 21:53:05 +0000
committerDouglas Gilbert <dgilbert@interlog.com>2019-09-17 21:53:05 +0000
commitbcdf18e4dd92f592617c35edbc9ffbb2817bd36c (patch)
treed408e019b135df92eb3f6860333865b9c9064b5c /src/sg_format.c
parenteaa9d929aba1cc812418582c779731bcde2adf68 (diff)
downloadsg3_utils-bcdf18e4dd92f592617c35edbc9ffbb2817bd36c.tar.gz
sync with fixes from Redhat, via github; remove testing/Makefile.cplus and testing/Makefile.cplus_fb
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@832 6180dd3e-e324-4e3e-922d-17de1ae2f315
Diffstat (limited to 'src/sg_format.c')
-rw-r--r--src/sg_format.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/sg_format.c b/src/sg_format.c
index 12fa78d1..9b29caf9 100644
--- a/src/sg_format.c
+++ b/src/sg_format.c
@@ -40,7 +40,7 @@
#include "sg_pr2serr.h"
#include "sg_pt.h"
-static const char * version_str = "1.58 20190113";
+static const char * version_str = "1.59 20190913";
#define RW_ERROR_RECOVERY_PAGE 1 /* can give alternate with --mode=MP */
@@ -706,15 +706,9 @@ print_dev_id(int fd, uint8_t * sinq_resp, int max_rlen,
if (n > (SAFE_STD_INQ_RESP_LEN - 4))
n = (SAFE_STD_INQ_RESP_LEN - 4);
for (k = 0, has_sn = 0, has_di = 0; k < n; ++k) {
- if (VPD_UNIT_SERIAL_NUM == b[4 + k]) {
- if (has_di) {
- if (op->verbose)
- pr2serr("VPD_SUPPORTED_VPDS "
- "dis-ordered\n");
- goto out;
- }
+ if (VPD_UNIT_SERIAL_NUM == b[4 + k])
++has_sn;
- } else if (VPD_DEVICE_ID == b[4 + k]) {
+ else if (VPD_DEVICE_ID == b[4 + k]) {
++has_di;
break;
}