aboutsummaryrefslogtreecommitdiff
path: root/src/sg_sanitize.c
diff options
context:
space:
mode:
authorDouglas Gilbert <dgilbert@interlog.com>2022-01-28 20:51:37 +0000
committerDouglas Gilbert <dgilbert@interlog.com>2022-01-28 20:51:37 +0000
commitd5890d56b6bcb6d1aa277f0bab78abb1ef66a88e (patch)
tree7040a74064a5c63a64b95e577e402fb65aacb15e /src/sg_sanitize.c
parentbff5298804af11eab5072217d362f55707849a5a (diff)
downloadsg3_utils-d5890d56b6bcb6d1aa277f0bab78abb1ef66a88e.tar.gz
cleanup masks for PDT [0x1f] and group_number [0x3f]
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@934 6180dd3e-e324-4e3e-922d-17de1ae2f315
Diffstat (limited to 'src/sg_sanitize.c')
-rw-r--r--src/sg_sanitize.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/sg_sanitize.c b/src/sg_sanitize.c
index ade9be71..147898fe 100644
--- a/src/sg_sanitize.c
+++ b/src/sg_sanitize.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011-2021 Douglas Gilbert.
+ * Copyright (c) 2011-2022 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.
@@ -33,7 +33,7 @@
#include "sg_unaligned.h"
#include "sg_pr2serr.h"
-static const char * version_str = "1.17 20211114";
+static const char * version_str = "1.18 20220127";
/* Not all environments support the Unix sleep() */
#if defined(MSC_VER) || defined(__MINGW32__)
@@ -368,7 +368,7 @@ print_dev_id(int fd, uint8_t * sinq_resp, int max_rlen, int verbose)
n = SAFE_STD_INQ_RESP_LEN;
memcpy(sinq_resp, b, (n < max_rlen) ? n : max_rlen);
if (n == SAFE_STD_INQ_RESP_LEN) {
- pdt = b[0] & 0x1f;
+ pdt = b[0] & PDT_MASK;
printf(" %.8s %.16s %.4s peripheral_type: %s [0x%x]\n",
(const char *)(b + 8), (const char *)(b + 16),
(const char *)(b + 32),