[lm_sensors] Avoiding warnings when piping /dev/null to sensors-detect (#843507)
Jaromír Cápík
jcapik at fedoraproject.org
Thu Jul 25 16:32:38 UTC 2013
commit 94142e5e5d155b039553252cf717d536f3b52b6e
Author: Jaromir Capik <jcapik at redhat.com>
Date: Thu Jul 25 18:32:18 2013 +0200
Avoiding warnings when piping /dev/null to sensors-detect (#843507)
lm_sensors-3.3.4-sensors-detect-null-input.patch | 30 ++++++++++++++++++++++
lm_sensors.spec | 9 ++++++-
2 files changed, 38 insertions(+), 1 deletions(-)
---
diff --git a/lm_sensors-3.3.4-sensors-detect-null-input.patch b/lm_sensors-3.3.4-sensors-detect-null-input.patch
new file mode 100644
index 0000000..3d7ef79
--- /dev/null
+++ b/lm_sensors-3.3.4-sensors-detect-null-input.patch
@@ -0,0 +1,30 @@
+diff -Naur lm_sensors-3.3.4.orig/prog/detect/sensors-detect lm_sensors-3.3.4/prog/detect/sensors-detect
+--- lm_sensors-3.3.4.orig/prog/detect/sensors-detect 2013-05-20 21:25:22.000000000 +0200
++++ lm_sensors-3.3.4/prog/detect/sensors-detect 2013-07-25 18:24:41.636807410 +0200
+@@ -3707,7 +3707,7 @@
+ "Do you want to scan it? (\%s/selectively): ",
+ $default ? "YES/no" : "yes/NO";
+
+- $input = <STDIN>;
++ $input = <STDIN> || '';
+ if ($input =~ /^\s*n/i
+ || (!$default && $input !~ /^\s*[ys]/i)) {
+ print "\n";
+@@ -3718,7 +3718,7 @@
+ print "Please enter one or more addresses not to scan. Separate them with commas.\n",
+ "You can specify a range by using dashes. Example: 0x58-0x5f,0x69.\n",
+ "Addresses: ";
+- $input = <STDIN>;
++ $input = <STDIN> || '';
+ chomp($input);
+ @not_to_scan = parse_not_to_scan(0x03, 0x77, $input);
+ } elsif (($class & 0xff00) == 0x0300) {
+@@ -6859,7 +6859,7 @@
+ "safe though. Yes, you do have ISA I/O ports even if you do not have any\n".
+ "ISA slots! Do you want to scan the ISA I/O ports? (\%s): ",
+ $superio_features ? "yes/NO" : "YES/no";
+- $input = <STDIN>;
++ $input = <STDIN> || '';
+ unless ($input =~ /^\s*n/i
+ || ($superio_features && $input !~ /^\s*y/i)) {
+ if (initialize_ioports()) {
diff --git a/lm_sensors.spec b/lm_sensors.spec
index 2b02642..f91da5b 100644
--- a/lm_sensors.spec
+++ b/lm_sensors.spec
@@ -1,6 +1,6 @@
Name: lm_sensors
Version: 3.3.4
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: Hardware monitoring tools
Group: Applications/System
License: LGPLv2+
@@ -13,6 +13,8 @@ Source1: lm_sensors.sysconfig
Source2: sensord.sysconfig
Source3: sensord.systemd
+Patch0: lm_sensors-3.3.4-sensors-detect-null-input.patch
+
%ifarch %{ix86} x86_64
Requires: /usr/sbin/dmidecode
%endif
@@ -56,6 +58,8 @@ database, and warns of sensor alarms.
%prep
%setup -q
+%patch0 -p1
+
mv prog/init/README prog/init/README.initscripts
chmod -x prog/init/fancontrol.init
@@ -153,6 +157,9 @@ fi
%changelog
+* Thu Jul 25 2013 Jaromir Capik <jcapik at redhat.com> - 3.3.4-3
+- Avoiding warnings when piping /dev/null to sensors-detect (#843507)
+
* Wed Jul 17 2013 Petr Pisar <ppisar at redhat.com> - 3.3.4-2
- Perl 5.18 rebuild
More information about the scm-commits
mailing list