aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Gilbert <dgilbert@interlog.com>2022-01-03 17:49:24 +0000
committerDouglas Gilbert <dgilbert@interlog.com>2022-01-03 17:49:24 +0000
commitfc72119f67614152d635452856ec9894474599e4 (patch)
treeda19b5b2ab82ee09f357a72006ae92d50c9498e2
parenta4e181c479918a5697a1826960265706049dd929 (diff)
downloadsg3_utils-fc72119f67614152d635452856ec9894474599e4.tar.gz
rescan-scsi-bus.sh: apply fix for '-r' from https://github.com/doug-gilbert/sg3_utils/pull/10/ from Nitin U. Yewale, broken by rev 867
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@929 6180dd3e-e324-4e3e-922d-17de1ae2f315
-rw-r--r--BSD_LICENSE2
-rw-r--r--CREDITS8
-rw-r--r--ChangeLog5
-rw-r--r--debian/changelog2
-rw-r--r--doc/rescan-scsi-bus.sh.82
-rw-r--r--doc/sg3_utils.84
-rwxr-xr-xscripts/rescan-scsi-bus.sh10
-rw-r--r--sg3_utils.spec2
8 files changed, 24 insertions, 11 deletions
diff --git a/BSD_LICENSE b/BSD_LICENSE
index eef2b043..426cf50c 100644
--- a/BSD_LICENSE
+++ b/BSD_LICENSE
@@ -1,5 +1,5 @@
-Copyright (c) 1999-2019, Douglas Gilbert
+Copyright (c) 1999-2022, Douglas Gilbert
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/CREDITS b/CREDITS
index f989da79..7bafd096 100644
--- a/CREDITS
+++ b/CREDITS
@@ -46,7 +46,7 @@ Eric Youngdale <eric at andante dot org> author of scsi_info on which sginfo
is based.
Fabrice Fontaine <fontaine dot fabrice at gmail dot com>
- various build fixes [20211116]
+ various build fixes [20211116]
Frank Jansen <fjansen at egenera dot com>: additions to sg_scan; contributed
code for '--alloc-length=' option in sg_persist [20090402]
@@ -117,6 +117,10 @@ Martin Wilck <mwilck at suse dot com> contributed script files [20190425]
Nate Dailey < Nate dot Dailey at stratus dot com > extended sg_map for sparse
disk node names (e.g. /dev/sdaaa) [20050511]
+Nitin U. Yewale < nyewale at redhat dot com> sent patch via github:
+ https://github.com/doug-gilbert/sg3_utils/pull/10/ to fix crash with
+ rescan-scsi-bus.sh -r due to rev 867 change to sg_inq [20220103]
+
Pat LaVarre <p.lavarre at ieee dot org> pointed out danger of negative bpt
values in sg_dd (and friends); also problems when reading /dev/null
@@ -155,4 +159,4 @@ Xose Vazquez Perez <xose dot vazquez at gmail dot com>
Douglas Gilbert
-17th January 2020
+3rd January 2022
diff --git a/ChangeLog b/ChangeLog
index 7eafa3b0..0602f52c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,7 +2,10 @@ 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 [20211230] [svn: r928]
+Changelog for pre-release sg3_utils-1.48 [20220103] [svn: r929]
+ - 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
- sg_z_act_query: new utility for sending either a
Zone activate or Zone query command
- sg_rep_zones: add Report zone starting LBA granularity
diff --git a/debian/changelog b/debian/changelog
index 6f3a3423..84ddb62a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,7 +2,7 @@ sg3-utils (1.48-0.1) unstable; urgency=low
* New upstream version
- -- Douglas Gilbert <dgilbert@interlog.com> Fri, 31 Dec 2021 13:00:00 -0500
+ -- Douglas Gilbert <dgilbert@interlog.com> Sat, 01 Jan 2022 13:00:00 -0500
sg3-utils (1.47-0.1) unstable; urgency=low
diff --git a/doc/rescan-scsi-bus.sh.8 b/doc/rescan-scsi-bus.sh.8
index 9286d345..b5e84cb5 100644
--- a/doc/rescan-scsi-bus.sh.8
+++ b/doc/rescan-scsi-bus.sh.8
@@ -1,4 +1,4 @@
-.TH RESCAN\-SCSI\-BUS.SH "1" "April 2021" "rescan\-scsi\-bus.sh" "User Commands"
+.TH RESCAN\-SCSI\-BUS.SH "1" "January 2022" "rescan\-scsi\-bus.sh" "User Commands"
.SH NAME
rescan-scsi-bus.sh \- script to add and remove SCSI devices without rebooting
.SH SYNOPSIS
diff --git a/doc/sg3_utils.8 b/doc/sg3_utils.8
index 954126f6..5460f215 100644
--- a/doc/sg3_utils.8
+++ b/doc/sg3_utils.8
@@ -1,4 +1,4 @@
-.TH SG3_UTILS "8" "December 2021" "sg3_utils\-1.48" SG3_UTILS
+.TH SG3_UTILS "8" "January 2022" "sg3_utils\-1.48" SG3_UTILS
.SH NAME
sg3_utils \- a package of utilities for sending SCSI commands
.SH SYNOPSIS
@@ -839,7 +839,7 @@ CREDITS file and individual source files (in the 'src' directory).
.SH "REPORTING BUGS"
Report bugs to <dgilbert at interlog dot com>.
.SH COPYRIGHT
-Copyright \(co 1999\-2021 Douglas Gilbert
+Copyright \(co 1999\-2022 Douglas Gilbert
.br
Some utilities are distributed under a GPL version 2 license while
others, usually more recent ones, are under a FreeBSD license. The files
diff --git a/scripts/rescan-scsi-bus.sh b/scripts/rescan-scsi-bus.sh
index 46fe6c06..23eff3b0 100755
--- a/scripts/rescan-scsi-bus.sh
+++ b/scripts/rescan-scsi-bus.sh
@@ -1,10 +1,10 @@
#!/bin/bash
# Script to rescan SCSI bus, using the scsi add-single-device mechanism.
# (c) 1998--2010 Kurt Garloff <kurt@garloff.de>, GNU GPL v2 or v3
-# (c) 2006--2018 Hannes Reinecke, GNU GPL v2 or later
+# (c) 2006--2022 Hannes Reinecke, GNU GPL v2 or later
# $Id: rescan-scsi-bus.sh,v 1.57 2012/03/31 14:08:48 garloff Exp $
-VERSION="20180615"
+VERSION="20220103"
SCAN_WILD_CARD=4294967295
setcolor ()
@@ -307,7 +307,13 @@ testonline ()
IPREV=$(echo "$INQ" | grep 'Product revision level:' | sed 's/^[^:]*: \(.*\)$/\1/')
STR=$(printf " Vendor: %-08s Model: %-16s Rev: %-4s" "$IVEND" "$IPROD" "$IPREV")
IPTYPE=$(echo "$INQ" | sed -n 's/.* Device_type=\([0-9]*\) .*/\1/p')
+ if [ -z "$IPTYPE" ]; then
+ IPTYPE=$(echo "$INQ" | sed -n 's/.* PDT=\([0-9]*\) .*/\1/p')
+ fi
IPQUAL=$(echo "$INQ" | sed -n 's/ *PQual=\([0-9]*\) Device.*/\1/p')
+ if [ -z "$IPQUAL" ] ; then
+ IPQUAL=$(echo "$INQ" | sed -n 's/ *PQual=\([0-9]*\) PDT.*/\1/p')
+ fi
if [ "$IPQUAL" != 0 ] ; then
[ -z "$IPQUAL" ] && IPQUAL=3
[ -z "$IPTYPE" ] && IPTYPE=31
diff --git a/sg3_utils.spec b/sg3_utils.spec
index 1d7b5a38..9060e663 100644
--- a/sg3_utils.spec
+++ b/sg3_utils.spec
@@ -84,7 +84,7 @@ fi
%{_libdir}/*.la
%changelog
-* Fri Dec 31 2021 - dgilbert at interlog dot com
+* Sat Jan 01 2022 - dgilbert at interlog dot com
- track t10 changes
* sg3_utils-1.48