diff --git a/sg3_utils-1.37-dont-open-dev-snapshot.patch b/sg3_utils-1.37-dont-open-dev-snapshot.patch new file mode 100644 index 0000000..2fbfe3a --- /dev/null +++ b/sg3_utils-1.37-dont-open-dev-snapshot.patch @@ -0,0 +1,27 @@ +From a0569d83929d98c0a175bc3992352c2c8d09ffa4 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Dan=20Hor=C3=A1k?= +Date: Fri, 18 Oct 2013 12:38:05 +0200 +Subject: [PATCH] don't open /dev/snapshot in sginfo (#920687) + +see https://bugzilla.redhat.com/show_bug.cgi?id=920687 for details +--- + src/sginfo.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/sginfo.c b/src/sginfo.c +index b27f117..1f2151d 100644 +--- a/src/sginfo.c ++++ b/src/sginfo.c +@@ -3408,6 +3408,9 @@ show_devices(int raw) + if ( isdigit(entry->d_name[strlen(entry->d_name)-1]) ) { + continue; + } ++ if ( strncmp("snapshot",entry->d_name,8) == 0 ) { ++ continue; ++ } + + snprintf(dev_name, sizeof(dev_name),"/dev/%s",entry->d_name); + +-- +1.8.1.4 + diff --git a/sg3_utils.spec b/sg3_utils.spec index 9685aa0..0edfce7 100644 --- a/sg3_utils.spec +++ b/sg3_utils.spec @@ -3,10 +3,12 @@ Summary: Utilities for devices that use SCSI command sets Name: sg3_utils Version: 1.37 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ and BSD Group: Applications/System Source0: http://sg.danny.cz/sg/p/sg3_utils-%{version}.tgz +# https://bugzilla.redhat.com/show_bug.cgi?id=920687 +Patch0: sg3_utils-1.37-dont-open-dev-snapshot.patch URL: http://sg.danny.cz/sg/sg3_utils.html Requires: %{name}-libs = %{version}-%{release} @@ -44,6 +46,7 @@ developing applications. %prep %setup -q +%patch0 -p1 -b .dev-snapshot %build @@ -84,6 +87,9 @@ install -p -m 755 scripts/%{rescan_script} $RPM_BUILD_ROOT%{_bindir} %changelog +* Fri Oct 18 2013 Dan Horák - 1.37-2 +- include fix for #920687 + * Wed Oct 16 2013 Dan Horák - 1.37-1 - update to version 1.37 - switch to included rescan-scsi-bus script