Accepting request 425316 from home:sparschauer:branches:Base:System
- using "--lun" now works correctly (bsc#981452), adding patch: * add-lunsearch-filter-to-searchexisting.patch OBS-URL: https://build.opensuse.org/request/show/425316 OBS-URL: https://build.opensuse.org/package/show/Base:System/sg3_utils?expand=0&rev=61
This commit is contained in:
parent
4093ad11f7
commit
7bb04a711b
44
add-lunsearch-filter-to-searchexisting.patch
Normal file
44
add-lunsearch-filter-to-searchexisting.patch
Normal file
@ -0,0 +1,44 @@
|
||||
From: Sebastian Parschauer <sparschauer@suse.de>
|
||||
Date: Wed, 31 Aug 2016 15:34:23 +0200
|
||||
Subject: [PATCH] rescan-scsi-bus.sh: Add lunsearch filter to searchexisting()
|
||||
References: bnc#981452
|
||||
Patch-Mainline: not yet, sent but waiting for upstream response
|
||||
|
||||
A user has reported that `rescan-scsi-bus.sh --luns=<lun #>` prints
|
||||
all existing LUNs and scans all new LUNs instead of only the ones
|
||||
specified. The problem is that searchexisting() always calls
|
||||
doreportlun() and is missing the lunsearch filter e.g. used in
|
||||
dosearch().
|
||||
So add the required lunsearch filter from dosearch() to
|
||||
searchexisting().
|
||||
|
||||
Signed-off-by: Sebastian Parschauer <sparschauer@suse.de>
|
||||
---
|
||||
scripts/rescan-scsi-bus.sh | 14 ++++++++++++--
|
||||
1 file changed, 12 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/scripts/rescan-scsi-bus.sh b/scripts/rescan-scsi-bus.sh
|
||||
index fad4868..5bc4a95 100755
|
||||
--- a/scripts/rescan-scsi-bus.sh
|
||||
+++ b/scripts/rescan-scsi-bus.sh
|
||||
@@ -711,7 +711,16 @@ searchexisting()
|
||||
else
|
||||
match=1
|
||||
fi
|
||||
- test $match -eq 1 && doreportlun
|
||||
+
|
||||
+ test $match -eq 0 && continue
|
||||
+
|
||||
+ if [ -z "$lunsearch" ] ; then
|
||||
+ doreportlun
|
||||
+ else
|
||||
+ for lun in $lunsearch ; do
|
||||
+ dolunscan
|
||||
+ done
|
||||
+ fi
|
||||
done
|
||||
}
|
||||
|
||||
--
|
||||
2.6.6
|
||||
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 7 16:26:26 CEST 2016 - sparschauer@suse.de
|
||||
|
||||
- using "--lun" now works correctly (bsc#981452), adding patch:
|
||||
* add-lunsearch-filter-to-searchexisting.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Apr 29 09:13:41 CEST 2016 - hare@suse.de
|
||||
|
||||
|
@ -28,6 +28,7 @@ Url: http://sg.danny.cz/sg/sg3_utils.html
|
||||
Source: sg3_utils-%{version}.tar.xz
|
||||
Source1: 40-usb-blacklist.rules
|
||||
Patch1: sgut-libversioning.diff
|
||||
Patch2: add-lunsearch-filter-to-searchexisting.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildRequires: libtool
|
||||
BuildRequires: udev
|
||||
@ -84,6 +85,7 @@ applications that want to make use of libsgutils.
|
||||
%prep
|
||||
%setup -q
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
|
||||
%build
|
||||
autoreconf -fi
|
||||
|
Loading…
Reference in New Issue
Block a user