rescan-scsi-bus.sh: rev 815 changed the order of listing hosts from numeric to alphabetical, change it back to numeric
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@939 6180dd3e-e324-4e3e-922d-17de1ae2f315
diff --git a/CREDITS b/CREDITS
index 7bafd09..1b1de83 100644
--- a/CREDITS
+++ b/CREDITS
@@ -112,7 +112,8 @@
Martin Schwenke <martin at meltin dot net> added the raw switch "-r" to sg_inq
-Martin Wilck <mwilck at suse dot com> contributed script files [20190425]
+Martin Wilck <mwilck at suse dot com> contributed script files [20190425 and
+ 20220218]]
Nate Dailey < Nate dot Dailey at stratus dot com > extended sg_map for sparse
disk node names (e.g. /dev/sdaaa) [20050511]
@@ -159,4 +160,4 @@
Douglas Gilbert
-3rd January 2022
+18th February 2022
diff --git a/ChangeLog b/ChangeLog
index eb4dad3..cf9444e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,7 +2,7 @@
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 [20220217] [svn: r938]
+Changelog for pre-release sg3_utils-1.48 [20220218] [svn: r939]
- sg_z_act_query: new utility for sending either a
Zone activate or Zone query command
- sg_rep_density: new utility for decoding the response of
@@ -12,6 +12,8 @@
Change script to use either
- undo regression in rev 815 that added newline after
each LUN in the default (no option) output
+ - rev 815 changed the order of listing hosts from
+ numeric to alphabetical, change it back to numeric
- sg_rep_zones: add Report zone starting LBA granularity
field in REPORT ZONES response [zbc2r12]
- add --brief option, show part of header and last
diff --git a/scripts/rescan-scsi-bus.sh b/scripts/rescan-scsi-bus.sh
index 78544b1..862bada 100755
--- a/scripts/rescan-scsi-bus.sh
+++ b/scripts/rescan-scsi-bus.sh
@@ -73,8 +73,8 @@
echo "No SCSI host adapters found in sysfs"
exit 1;
fi
- # Not necessary just use double quotes around variable to preserve new lines
- #hosts=$(echo $hosts | tr ' ' '\n')
+ # ensure numeric ordering. No quotes arount $hosts to skip leading space.
+ hosts=$(echo $hosts | tr ' ' '\n' | sort -n)
}
# Return hosts. /proc/scsi/HOSTADAPTER/? must exist
diff --git a/src/sg_get_lba_status.c b/src/sg_get_lba_status.c
index 4ce9b2c..dae508a 100644
--- a/src/sg_get_lba_status.c
+++ b/src/sg_get_lba_status.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009-2021 Douglas Gilbert.
+ * Copyright (c) 2009-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.
@@ -35,7 +35,7 @@
* device.
*/
-static const char * version_str = "1.23 20211104"; /* sbc4r15 */
+static const char * version_str = "1.24 20220218"; /* sbc4r15 */
#ifndef UINT32_MAX
#define UINT32_MAX ((uint32_t)-1)
@@ -354,7 +354,6 @@
ret = SG_LIB_SYNTAX_ERROR;
goto fini;
}
- res = 0;
goto start_response;
} else {
pr2serr("missing device name!\n\n");
diff --git a/src/sg_logs.c b/src/sg_logs.c
index 2fce0b5..f125878 100644
--- a/src/sg_logs.c
+++ b/src/sg_logs.c
@@ -36,7 +36,7 @@
#include "sg_unaligned.h"
#include "sg_pr2serr.h"
-static const char * version_str = "1.94 20220201"; /* spc6r06 + sbc5r01 */
+static const char * version_str = "1.95 20220218"; /* spc6r06 + sbc5r01 */
#define MX_ALLOC_LEN (0xfffc)
#define SHORT_RESP_LEN 128
@@ -7218,7 +7218,6 @@
}
op->pg_code = PROTO_SPECIFIC_LPAGE;
}
- pg_len = 0;
memset(&inq_out, 0, sizeof(inq_out));
if (op->no_inq < 2) {
diff --git a/src/sg_rep_zones.c b/src/sg_rep_zones.c
index c77bd78..90d744a 100644
--- a/src/sg_rep_zones.c
+++ b/src/sg_rep_zones.c
@@ -39,7 +39,7 @@
* Based on zbc2r10.pdf
*/
-static const char * version_str = "1.31 20220201";
+static const char * version_str = "1.32 20220218";
#define WILD_RZONES_BUFF_LEN (1 << 28)
#define MAX_RZONES_BUFF_LEN (2 * 1024 * 1024)
@@ -614,7 +614,6 @@
const uint8_t * bp = rzBuff;
char b[96];
- k = 0;
while (true) {
resid = 0;
res = sg_ll_report_zzz(sg_fd, REPORT_ZONES_SA, slba,
diff --git a/src/sg_ses.c b/src/sg_ses.c
index aa545a8..7d43711 100644
--- a/src/sg_ses.c
+++ b/src/sg_ses.c
@@ -38,7 +38,7 @@
* commands tailored for SES (enclosure) devices.
*/
-static const char * version_str = "2.55 20220127"; /* ses4r04 */
+static const char * version_str = "2.56 20220218"; /* ses4r04 */
#define MX_ALLOC_LEN ((64 * 1024) - 4) /* max allowable for big enclosures */
#define MX_ELEM_HDR 1024
@@ -5515,7 +5515,7 @@
"['es' or 'ec'] page");
if (op->ind_given && op->ind_etp &&
(cp = etype_str(op->ind_etp->elem_type_code, bb, sizeof(bb)))) {
- printf("\n(element type: %s)", bb);
+ printf("\n(element type: %s)", cp);
given_et = true;
}
printf(":\n");
diff --git a/src/sg_vpd.c b/src/sg_vpd.c
index 3195418..9350dbc 100644
--- a/src/sg_vpd.c
+++ b/src/sg_vpd.c
@@ -40,7 +40,7 @@
*/
-static const char * version_str = "1.69 20220217"; /* spc6r06 + sbc5r01 */
+static const char * version_str = "1.70 20220218"; /* spc6r06 + sbc5r01 */
/* standard VPD pages, in ascending page number order */
#define VPD_SUPPORTED_VPDS 0x0
@@ -755,7 +755,6 @@
uint8_t sas_tport_addr[8];
rtp = 0;
- u = 0;
memset(sas_tport_addr, 0, sizeof(sas_tport_addr));
for (k = 0, off = -1; true; ++k) {
if ((0 == k) && (0 != buff[2])) {