lm_sensors/lm_sensors-3.3.4-sensors-detect-null-input.patch

31 lines
1.3 KiB
Diff

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()) {