mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-29 21:08:19 +00:00
sensors-detect: Fix use of uninitialized value 'vendor_id' on ppc64
Based on a report and an original patch from Jaromir Capik: There's no vendor_id entry in the /proc/cpuinfo file in case of PPC64 systems and consequently the script returns 3 screens full of the following errors: Use of uninitialized value in string eq at /usr/sbin/sensors-detect line 6444 Use of uninitialized value in string eq at /usr/sbin/sensors-detect line 6459 Use of uninitialized value in string eq at /usr/sbin/sensors-detect line 6473
This commit is contained in:
1 parent
a3f215218f
commit
fbfbb9c9a8
2 files changed
+5
-1
No files matched your search
@@ -14,6 +14,7 @@ SVN HEAD
|
|||||||
Introduce automatic mode (--auto)
|
Introduce automatic mode (--auto)
|
||||||
Detect incorrect non-interactive runs
|
Detect incorrect non-interactive runs
|
||||||
Rework option handling
|
Rework option handling
|
||||||
|
Fix use of uninitialized value 'vendor_id' on ppc64
|
||||||
|
|
||||||
3.3.4 (2013-05-27)
|
3.3.4 (2013-05-27)
|
||||||
sensors.conf.5: Mention "sensors -u" to get the raw feature names
|
sensors.conf.5: Mention "sensors -u" to get the raw feature names
|
||||||
|
|||||||
@@ -2694,7 +2694,10 @@ sub initialize_cpu_list
|
|||||||
while (<INPUTFILE>) {
|
while (<INPUTFILE>) {
|
||||||
if (m/^processor\s*:\s*(\d+)/) {
|
if (m/^processor\s*:\s*(\d+)/) {
|
||||||
push @cpu, $entry if scalar keys(%{$entry}); # Previous entry
|
push @cpu, $entry if scalar keys(%{$entry}); # Previous entry
|
||||||
$entry = { nr => $1 }; # New entry
|
$entry = { # New entry
|
||||||
|
nr => $1,
|
||||||
|
vendor_id => "undefined",
|
||||||
|
};
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
if (m/^(vendor_id|cpu family|model|model name|stepping|cpuid level)\s*:\s*(.+)$/) {
|
if (m/^(vendor_id|cpu family|model|model name|stepping|cpuid level)\s*:\s*(.+)$/) {
|
||||||
|
|||||||
Reference in new issue
Block a user