summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/lm_sensors
diff options
context:
space:
mode:
authorLi Zhou <li.zhou@windriver.com>2016-09-07 09:46:29 +0800
committerMartin Jansa <Martin.Jansa@gmail.com>2016-09-15 10:22:45 +0200
commitd505a7aa72eab6f121458c745a2ecbd3d005aea6 (patch)
tree089c9020f293bd074e5ff5780f13e82249cd0cf1 /meta-oe/recipes-support/lm_sensors
parent35ee0a0493ce5b969392ee4c79f60126be646d68 (diff)
downloadmeta-openembedded-d505a7aa72eab6f121458c745a2ecbd3d005aea6.tar.gz
lmsensors: sensors-detect: print a special message when there isn't enough cpu info
When running sensors-detect, if there isn't enough information in /proc/cpuinfo for this arch (e.g. ppc64), "Use of uninitialized value in concatenation (.) or string at /usr/sbin/sensors-detect line 2867" and incomplete "# Processor: (//)" will be printed. Here print out a prompt for such a case. Signed-off-by: Li Zhou <li.zhou@windriver.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/recipes-support/lm_sensors')
-rw-r--r--meta-oe/recipes-support/lm_sensors/lmsensors/0001-lmsensors-sensors-detect-print-a-special-message-whe.patch40
-rw-r--r--meta-oe/recipes-support/lm_sensors/lmsensors_3.4.0.bb1
2 files changed, 41 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/lm_sensors/lmsensors/0001-lmsensors-sensors-detect-print-a-special-message-whe.patch b/meta-oe/recipes-support/lm_sensors/lmsensors/0001-lmsensors-sensors-detect-print-a-special-message-whe.patch
new file mode 100644
index 000000000..abf6e752a
--- /dev/null
+++ b/meta-oe/recipes-support/lm_sensors/lmsensors/0001-lmsensors-sensors-detect-print-a-special-message-whe.patch
@@ -0,0 +1,40 @@
1From c4428260e7685ebaf5c26c6ecaae5a56849853e8 Mon Sep 17 00:00:00 2001
2From: Li Zhou <li.zhou@windriver.com>
3Date: Tue, 6 Sep 2016 14:04:29 +0800
4Subject: [PATCH] lmsensors: sensors-detect: print a special message when there
5 isn't enough cpu info
6
7When running sensors-detect, if there isn't enough information in
8/proc/cpuinfo for this arch (e.g. ppc64), "Use of uninitialized value
9in concatenation (.) or string at /usr/sbin/sensors-detect line 2867"
10and incomplete "# Processor: (//)" will be printed.
11Here print out a prompt for such a case.
12
13Upstream-Status: Pending
14
15Signed-off-by: Li Zhou <li.zhou@windriver.com>
16---
17 prog/detect/sensors-detect | 7 ++++++-
18 1 file changed, 6 insertions(+), 1 deletion(-)
19
20diff --git a/prog/detect/sensors-detect b/prog/detect/sensors-detect
21index 3c2b44f..5f62405 100755
22--- a/prog/detect/sensors-detect
23+++ b/prog/detect/sensors-detect
24@@ -2864,7 +2864,12 @@ sub initialize_cpu_list
25 sub print_cpu_info
26 {
27 my $cpu = $cpu[0];
28- print "# Processor: $cpu->{'model name'} ($cpu->{'cpu family'}/$cpu->{model}/$cpu->{stepping})\n";
29+ if ( $cpu->{'model name'} && $cpu->{'cpu family'} && $cpu->{model} && $cpu->{stepping} ) {
30+ print "# Processor: $cpu->{'model name'} ($cpu->{'cpu family'}/$cpu->{model}/$cpu->{stepping})\n";
31+ }
32+ else {
33+ print "# Processor: There isn't enough cpu info for this arch!!!\n";
34+ }
35 }
36
37 # @i2c_adapters is a list of references to hashes, one hash per I2C/SMBus
38--
391.9.1
40
diff --git a/meta-oe/recipes-support/lm_sensors/lmsensors_3.4.0.bb b/meta-oe/recipes-support/lm_sensors/lmsensors_3.4.0.bb
index 857a57be5..8215d90a8 100644
--- a/meta-oe/recipes-support/lm_sensors/lmsensors_3.4.0.bb
+++ b/meta-oe/recipes-support/lm_sensors/lmsensors_3.4.0.bb
@@ -10,6 +10,7 @@ DEPENDS = "sysfsutils virtual/libiconv bison-native flex-native rrdtool"
10SRC_URI = "http://dl.lm-sensors.org/lm-sensors/releases/lm_sensors-${PV}.tar.bz2 \ 10SRC_URI = "http://dl.lm-sensors.org/lm-sensors/releases/lm_sensors-${PV}.tar.bz2 \
11 file://fancontrol.init \ 11 file://fancontrol.init \
12 file://sensord.init \ 12 file://sensord.init \
13 file://0001-lmsensors-sensors-detect-print-a-special-message-whe.patch \
13" 14"
14SRC_URI[md5sum] = "c03675ae9d43d60322110c679416901a" 15SRC_URI[md5sum] = "c03675ae9d43d60322110c679416901a"
15SRC_URI[sha256sum] = "e0579016081a262dd23eafe1d22b41ebde78921e73a1dcef71e05e424340061f" 16SRC_URI[sha256sum] = "e0579016081a262dd23eafe1d22b41ebde78921e73a1dcef71e05e424340061f"