aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rw-r--r--doc/sg_inq.88
-rw-r--r--doc/sg_vpd.88
-rw-r--r--src/sg_inq.c5
-rw-r--r--src/sg_vpd.c13
-rw-r--r--testing/sg_mrq_dd.cpp32
6 files changed, 36 insertions, 32 deletions
diff --git a/ChangeLog b/ChangeLog
index 0602f52c..7da4a767 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,7 +2,7 @@ Each utility has its own version number, date of last change and
some description at the top of its ".c" file. All utilities in the main
directory have their own "man" pages. There is also a sg3_utils man page.
-Changelog for pre-release sg3_utils-1.48 [20220103] [svn: r929]
+Changelog for pre-release sg3_utils-1.48 [20220109] [svn: r930]
- rescan-scsi-bus.sh: with '-r' it crashed due to change in
rev 867 in sg_inq.c from Device_type= to PDT= .
Change script to use either
diff --git a/doc/sg_inq.8 b/doc/sg_inq.8
index a0bfae94..1e38f6a9 100644
--- a/doc/sg_inq.8
+++ b/doc/sg_inq.8
@@ -1,4 +1,4 @@
-.TH SG_INQ "8" "June 2021" "sg3_utils\-1.47" SG3_UTILS
+.TH SG_INQ "8" "January 2022" "sg3_utils\-1.48" SG3_UTILS
.SH NAME
sg_inq \- issue SCSI INQUIRY command and/or decode its response
.SH SYNOPSIS
@@ -54,8 +54,8 @@ In some operating systems a NVMe device (e.g. SSD) may be given as the
\fIDEVICE\fR. For more information see the NVME DEVICES section below.
.PP
The reference document used for interpreting an INQUIRY is T10/BSR INCITS
-502 Revision 19 which is draft SPC\-5 revision 19, 14 February 2018). It can
-be found at https://www.t10.org . Obsolete and reserved items in the standard
+566 Revision 6 which is draft SPC\-6 dated 22 October 2021. It can be found
+at https://www.t10.org . Obsolete and reserved items in the standard
INQUIRY response output are displayed in square brackets.
.SH OPTIONS
Arguments to long options are mandatory for short options as well.
@@ -526,7 +526,7 @@ Written by Douglas Gilbert
.SH "REPORTING BUGS"
Report bugs to <dgilbert at interlog dot com>.
.SH COPYRIGHT
-Copyright \(co 2001\-2021 Douglas Gilbert
+Copyright \(co 2001\-2022 Douglas Gilbert
.br
This software is distributed under the GPL version 2. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
diff --git a/doc/sg_vpd.8 b/doc/sg_vpd.8
index e1e19956..5bf6e893 100644
--- a/doc/sg_vpd.8
+++ b/doc/sg_vpd.8
@@ -1,4 +1,4 @@
-.TH SG_VPD "8" "June 2021" "sg3_utils\-1.47" SG3_UTILS
+.TH SG_VPD "8" "January 2022" "sg3_utils\-1.48" SG3_UTILS
.SH NAME
sg_vpd \- fetch SCSI VPD page and/or decode its response
.SH SYNOPSIS
@@ -26,8 +26,8 @@ has been flagged as mandatory. This page can be fetched by
using the \fI\-\-ident\fR option.
.PP
The reference document used for interpreting VPD pages (and the INQUIRY
-standard response) is T10/BSR INCITS 502 Revision 22 which is draft SPC\-5
-revision 19, 22 April 2019. It can be found at https://www.t10.org .
+standard response) is T10/BSR INCITS 566 Revision 6 which is draft SPC\-6
+dated 22 October 2021. It can be found at https://www.t10.org .
.PP
When no options are given, other than a \fIDEVICE\fR, then the "Supported
VPD pages" (0x0) VPD page is fetched and decoded.
@@ -337,7 +337,7 @@ Written by Douglas Gilbert
.SH "REPORTING BUGS"
Report bugs to <dgilbert at interlog dot com>.
.SH COPYRIGHT
-Copyright \(co 2006\-2021 Douglas Gilbert
+Copyright \(co 2006\-2022 Douglas Gilbert
.br
This software is distributed under a FreeBSD license. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
diff --git a/src/sg_inq.c b/src/sg_inq.c
index a3a8f0af..7540797e 100644
--- a/src/sg_inq.c
+++ b/src/sg_inq.c
@@ -1,5 +1,5 @@
/* A utility program originally written for the Linux OS SCSI subsystem.
- * Copyright (C) 2000-2021 D. Gilbert
+ * Copyright (C) 2000-2022 D. Gilbert
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
@@ -51,7 +51,7 @@
#include "sg_pt_nvme.h"
#endif
-static const char * version_str = "2.13 20210803"; /* spc6r05 */
+static const char * version_str = "2.14 20220109"; /* spc6r06 */
/* INQUIRY notes:
* It is recommended that the initial allocation length given to a
@@ -2380,6 +2380,7 @@ decode_b1_vpd(uint8_t * buff, int len, int do_hex)
}
zoned = (buff[8] >> 4) & 0x3; /* added sbc4r04 */
printf(" ZONED=%d%s\n", zoned, zoned_strs[zoned]);
+ /* ZONED field made obsolete in sbc5r01 */
printf(" FUAB=%d\n", buff[8] & 0x2);
printf(" VBULS=%d\n", buff[8] & 0x1);
printf(" DEPOPULATION_TIME=%u (seconds)\n",
diff --git a/src/sg_vpd.c b/src/sg_vpd.c
index cbd2876b..0ca63030 100644
--- a/src/sg_vpd.c
+++ b/src/sg_vpd.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021 Douglas Gilbert.
+ * Copyright (c) 2006-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.
@@ -40,7 +40,7 @@
*/
-static const char * version_str = "1.67 20211112"; /* spc6r05 + sbc5r01 */
+static const char * version_str = "1.67 20220109"; /* spc6r06 + sbc5r01 */
/* standard VPD pages, in ascending page number order */
#define VPD_SUPPORTED_VPDS 0x0
@@ -2565,13 +2565,16 @@ decode_zbdch_vpd(uint8_t * b, int len, int do_hex)
printf(" Zoned block device extension: ");
switch ((b[4] >> 4) & 0xf) {
case 0:
- printf("not reported [0]\n");
+ if (PDT_ZBC == (0x1f & b[0]))
+ printf("host managed zoned block device [0, pdt=0x14]\n");
+ else
+ printf("not reported [0]\n");
break;
case 1:
- printf("host aware zone block device model\n");
+ printf("host aware zoned block device model [1]\n");
break;
case 2:
- printf("Domains and realms zone block device model\n");
+ printf("Domains and realms zoned block device model [2]\n");
break;
default:
printf("Unknown [0x%x]\n", (b[4] >> 4) & 0xf);
diff --git a/testing/sg_mrq_dd.cpp b/testing/sg_mrq_dd.cpp
index bb6b3a03..a97aa9be 100644
--- a/testing/sg_mrq_dd.cpp
+++ b/testing/sg_mrq_dd.cpp
@@ -2,7 +2,7 @@
* A utility program for copying files. Specialised for "files" that
* represent devices that understand the SCSI command set.
*
- * Copyright (C) 2018-2021 D. Gilbert
+ * Copyright (C) 2018-2022 D. Gilbert
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
@@ -30,7 +30,7 @@
*
*/
-static const char * version_str = "1.38 20211028";
+static const char * version_str = "1.39 20220103";
#define _XOPEN_SOURCE 600
#ifndef _GNU_SOURCE
@@ -1268,7 +1268,7 @@ sg_in_open(struct global_collection *clp, const string & inf, uint8_t **mmpp,
int fd, err, n;
int flags = O_RDWR;
char ebuff[EBUFF_SZ];
- const char * fnp = inf.data();
+ const char * fnp = inf.c_str();
if (clp->in_flags.direct)
flags |= O_DIRECT;
@@ -1301,7 +1301,7 @@ sg_out_open(struct global_collection *clp, const string & outf,
int fd, err, n;
int flags = O_RDWR;
char ebuff[EBUFF_SZ];
- const char * fnp = outf.data();
+ const char * fnp = outf.c_str();
if (clp->out_flags.direct)
flags |= O_DIRECT;
@@ -1350,13 +1350,13 @@ reg_file_open(struct global_collection *clp, const string & fn_s,
flags |= O_SYNC;
if (for_wr)
- fd = open(fn_s.data(), flags, 0666);
+ fd = open(fn_s.c_str(), flags, 0666);
else
- fd = open(fn_s.data(), flags);
+ fd = open(fn_s.c_str(), flags);
if (fd < 0) {
int err = errno;
snprintf(ebuff, EBUFF_SZ, "%scould not open %s for %sing ",
- my_name, fn_s.data(), (for_wr ? "writ" : "read"));
+ my_name, fn_s.c_str(), (for_wr ? "writ" : "read"));
perror(ebuff);
return -err;
}
@@ -1618,7 +1618,7 @@ read_write_thread(struct global_collection * clp, int thr_idx, int slice_idx,
pr2serr_lk("%d <-- Starting worker thread, slice=%d\n", thr_idx,
slice_idx);
if (vb > 3)
- pr2serr_lk(" %s ---> %s\n", inf.data(), outf.data());
+ pr2serr_lk(" %s ---> %s\n", inf.c_str(), outf.c_str());
}
if (! (rep->both_sg || in_mmap)) {
rep->buffp = sg_memalign(sz, 0 /* page align */, &rep->alloc_bp,
@@ -4316,7 +4316,7 @@ main(int argc, char * argv[])
if (ccp) {
if (ifile_given) {
pr2serr("%siflag=%s and if=%s contradict\n", my_name, cc2p,
- clp->inf_v[0].data());
+ clp->inf_v[0].c_str());
return SG_LIB_CONTRADICT;
}
for (auto && cvp : clp->cp_ver_arr) {
@@ -4327,9 +4327,9 @@ main(int argc, char * argv[])
clp->in_type = FT_RANDOM_0_FF;
clp->infp = ccp;
clp->in0fd = -1;
- } else if (inf0_sz && ('-' != clp->inf_v[0].data()[0])) {
+ } else if (inf0_sz && ('-' != clp->inf_v[0].c_str()[0])) {
const string & inf_s = clp->inf_v[0];
- const char * infp = inf_s.data();
+ const char * infp = inf_s.c_str();
clp->in_type = dd_filetype(infp, clp->in_st_size);
if (FT_ERROR == clp->in_type) {
@@ -4371,8 +4371,8 @@ main(int argc, char * argv[])
(clp->in_flags.no_waitq || clp->out_flags.no_waitq))
pr2serr("no_waitq=<n> operand is now ignored\n");
if (clp->outf_v.size()) {
- const string & outf_s = clp->outf_v[0].data();
- const char * outfp = outf_s.data();
+ const string & outf_s = clp->outf_v[0].c_str();
+ const char * outfp = outf_s.c_str();
clp->ofile_given = true;
if ('-' == outfp[0])
@@ -4459,8 +4459,8 @@ main(int argc, char * argv[])
pr2serr("The seek= argument is not suitable for a pipe\n");
return SG_LIB_SYNTAX_ERROR;
}
- res = do_count_work(clp, clp->inf_v[0].data(), in_num_sect,
- clp->outf_v[0].data(), out_num_sect);
+ res = do_count_work(clp, clp->inf_v[0].c_str(), in_num_sect,
+ clp->outf_v[0].c_str(), out_num_sect);
if (res)
return res;
@@ -4561,7 +4561,7 @@ jump:
if (do_sync) {
if (FT_SG == clp->out_type) {
pr2serr_lk(">> Synchronizing cache on %s\n",
- (clp->outf_v.size() ? clp->outf_v[0].data() : "" ));
+ (clp->outf_v.size() ? clp->outf_v[0].c_str() : "" ));
res = sg_ll_sync_cache_10(clp->out0fd, 0, 0, 0, 0, 0, false, 0);
if (SG_LIB_CAT_UNIT_ATTENTION == res) {
pr2serr_lk("Unit attention(out), continuing\n");