diff options
author | ToshikazuOhiwa <toshikazu_ohiwa@mail.toyota.co.jp> | 2020-03-30 09:24:26 +0900 |
---|---|---|
committer | ToshikazuOhiwa <toshikazu_ohiwa@mail.toyota.co.jp> | 2020-03-30 09:24:26 +0900 |
commit | 5b80bfd7bffd4c20d80b7c70a7130529e9a755dd (patch) | |
tree | b4bb18dcd1487dbf1ea8127e5671b7bb2eded033 /external/meta-openembedded/meta-oe/recipes-bsp/lm_sensors/lmsensors/0001-lmsensors-sensors-detect-print-a-special-message-whe.patch | |
parent | 706ad73eb02caf8532deaf5d38995bd258725cb8 (diff) |
agl-basesystem
Diffstat (limited to 'external/meta-openembedded/meta-oe/recipes-bsp/lm_sensors/lmsensors/0001-lmsensors-sensors-detect-print-a-special-message-whe.patch')
-rw-r--r-- | external/meta-openembedded/meta-oe/recipes-bsp/lm_sensors/lmsensors/0001-lmsensors-sensors-detect-print-a-special-message-whe.patch | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/external/meta-openembedded/meta-oe/recipes-bsp/lm_sensors/lmsensors/0001-lmsensors-sensors-detect-print-a-special-message-whe.patch b/external/meta-openembedded/meta-oe/recipes-bsp/lm_sensors/lmsensors/0001-lmsensors-sensors-detect-print-a-special-message-whe.patch new file mode 100644 index 00000000..abf6e752 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-bsp/lm_sensors/lmsensors/0001-lmsensors-sensors-detect-print-a-special-message-whe.patch @@ -0,0 +1,40 @@ +From c4428260e7685ebaf5c26c6ecaae5a56849853e8 Mon Sep 17 00:00:00 2001 +From: Li Zhou <li.zhou@windriver.com> +Date: Tue, 6 Sep 2016 14:04:29 +0800 +Subject: [PATCH] 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. + +Upstream-Status: Pending + +Signed-off-by: Li Zhou <li.zhou@windriver.com> +--- + prog/detect/sensors-detect | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/prog/detect/sensors-detect b/prog/detect/sensors-detect +index 3c2b44f..5f62405 100755 +--- a/prog/detect/sensors-detect ++++ b/prog/detect/sensors-detect +@@ -2864,7 +2864,12 @@ sub initialize_cpu_list + sub print_cpu_info + { + my $cpu = $cpu[0]; +- print "# Processor: $cpu->{'model name'} ($cpu->{'cpu family'}/$cpu->{model}/$cpu->{stepping})\n"; ++ if ( $cpu->{'model name'} && $cpu->{'cpu family'} && $cpu->{model} && $cpu->{stepping} ) { ++ print "# Processor: $cpu->{'model name'} ($cpu->{'cpu family'}/$cpu->{model}/$cpu->{stepping})\n"; ++ } ++ else { ++ print "# Processor: There isn't enough cpu info for this arch!!!\n"; ++ } + } + + # @i2c_adapters is a list of references to hashes, one hash per I2C/SMBus +-- +1.9.1 + |