fix syntax error introduced by patch
Signed-off-by: Wenchao Hao <haowenchao@huawei.com>
This commit is contained in:
parent
e87913b03f
commit
aea8bfe282
@ -3,54 +3,33 @@ From: sunshihao <sunshihao@huawei.com>
|
||||
Date: Thu, 16 Apr 2020 10:53:25 +0800
|
||||
Subject: [PATCH 3/4] bugfix-sg3_utils-fix-syntax-error
|
||||
|
||||
Signed-off-by: Wenchao Hao <haowenchao@huawei.com>
|
||||
---
|
||||
scripts/rescan-scsi-bus.sh | 10 +++++-----
|
||||
1 file changed, 5 insertions(+), 5 deletions(-)
|
||||
scripts/rescan-scsi-bus.sh | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/scripts/rescan-scsi-bus.sh b/scripts/rescan-scsi-bus.sh
|
||||
index b1cbebc..25a5f2a 100755
|
||||
index b1cbebc..5f867c4 100755
|
||||
--- a/scripts/rescan-scsi-bus.sh
|
||||
+++ b/scripts/rescan-scsi-bus.sh
|
||||
@@ -83,10 +83,10 @@ findhosts ()
|
||||
hosts=
|
||||
for driverdir in /proc/scsi/*; do
|
||||
driver=${driverdir#/proc/scsi/}
|
||||
- if [ "$driver" = scsi ] || [ "$driver" = sg ] || [ "$driver" = dummy ] || [ "$driver" = device_info ] ; then continue; fi
|
||||
+ if [ "$driver" = xscsi ] || [ "$driver" = xsg ] || [ "$driver" = xdummy ] || [ "$driver" = xdevice_info ] ; then continue; fi
|
||||
for hostdir in $driverdir/*; do
|
||||
name=${hostdir#/proc/scsi/*/}
|
||||
- if [ "$name" = add_map ] || [ "$name" = map ] || [ "$name" = mod_parm ] ; then continue; fi
|
||||
+ if [ "$name" = xadd_map ] || [ "$name" = xmap ] || [ "$name" = xmod_parm ] ; then continue; fi
|
||||
num=$name
|
||||
driverinfo=$driver
|
||||
if [ -r "$hostdir/status" ] ; then
|
||||
@@ -289,7 +289,7 @@ testonline ()
|
||||
print_and_scroll_back "$host:$channel:$id:$lun $SGDEV ($RMB) "
|
||||
[ $RC = 2 ] && [ "$RMB" = "1" ] && break
|
||||
done
|
||||
- if [ $ctr != 0 ] ; then
|
||||
+ if [ $xctr != x0 ] ; then
|
||||
+ if [ "$ctr" != 0 ] ; then
|
||||
white_out
|
||||
fi
|
||||
# echo -e "\e[A\e[A\e[A${yellow}Test existence of $SGDEV = $RC ${norm} \n\n\n"
|
||||
@@ -569,7 +569,7 @@ dolunscan()
|
||||
# Device not present
|
||||
printf "\r\e[A";
|
||||
# Optimization: if lun==0, stop here (only if in non-remove mode)
|
||||
- if [ "$lun" = 0 ] && [ -z "$remove" ] && [ "$optscan" = 1 ] ; then
|
||||
+ if [ x"$lun" = x0 ] && [ -z "$remove" ] && [ "x$optscan" = x1 ] ; then
|
||||
return 1;
|
||||
fi
|
||||
else
|
||||
@@ -1283,7 +1283,7 @@ if [ "$sync" = 2 ] ; then
|
||||
echo "Syncing file systems"
|
||||
sync
|
||||
fi
|
||||
-if [ -w /sys/module/scsi_mod/parameters/default_dev_flags ] && [ $scan_flags != 0 ] ; then
|
||||
+if [ -w /sys/module/scsi_mod/parameters/default_dev_flags ] && [ x$scan_flags != x0 ] ; then
|
||||
+if [ -w /sys/module/scsi_mod/parameters/default_dev_flags ] && [ "$scan_flags" != 0 ] ; then
|
||||
OLD_SCANFLAGS=$(cat /sys/module/scsi_mod/parameters/default_dev_flags)
|
||||
NEW_SCANFLAGS=$((OLD_SCANFLAGS|scan_flags))
|
||||
if [ "$OLD_SCANFLAGS" != "$NEW_SCANFLAGS" ] ; then
|
||||
--
|
||||
2.19.1
|
||||
2.35.3
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
Name: sg3_utils
|
||||
Version: 1.46
|
||||
Release: 4
|
||||
Release: 5
|
||||
Summary: Utilities that send SCSI commands to devices.
|
||||
License: GPL-2.0-or-later AND BSD
|
||||
URL: http://sg.danny.cz/sg/sg3_utils.html
|
||||
@ -76,6 +76,9 @@ rm -rf $RPM_BUILD_ROOT/%{_libdir}/*.la
|
||||
%{_mandir}/man8/*
|
||||
|
||||
%changelog
|
||||
* Fri Jul 1 2022 Wenchao Hao <haowenchao@huawei.com> -1.46-5
|
||||
- Fix grammar error in rescan-scsi-bus.sh introduced by patch
|
||||
|
||||
* Thu Feb 17 2022 Wenchao Hao <haowenchao@huawei.com> -1.46-4
|
||||
- Fix grammar error in rescan-scsi-bus.sh
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user