* [lm-sensors] [PATCH] sensors-detect : Fixing use of uninitialised value 'vendor_id' on ppc64
@ 2013-09-10 11:37 Jaromir Capik
2013-09-11 12:07 ` Jean Delvare
0 siblings, 1 reply; 2+ messages in thread
From: Jaromir Capik @ 2013-09-10 11:37 UTC (permalink / raw)
To: lm-sensors
[-- Attachment #1: Type: text/plain, Size: 692 bytes --]
Hello.
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
The attached patch fixes that.
Please, merge.
Thanks in advance.
Regards,
Jaromir.
--
Jaromir Capik
Red Hat Czech, s.r.o.
Software Engineer / Secondary Arch
Email: jcapik@redhat.com
Web: www.cz.redhat.com
Red Hat Czech s.r.o., Purkynova 99/71, 612 45, Brno, Czech Republic
IC: 27690016
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: lm_sensors-3.3.4-sensors-detect-ppc-missing-vendor_id.patch --]
[-- Type: text/x-patch; name=lm_sensors-3.3.4-sensors-detect-ppc-missing-vendor_id.patch, Size: 581 bytes --]
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-08-07 09:46:59.000000000 -0400
+++ lm_sensors-3.3.4/prog/detect/sensors-detect 2013-09-09 13:59:09.753266033 -0400
@@ -2657,6 +2657,7 @@
if (m/^processor\s*:\s*(\d+)/) {
push @cpu, $entry if scalar keys(%{$entry}); # Previous entry
$entry = { nr => $1 }; # New entry
+ $entry->{vendor_id} = "undefined";
next;
}
if (m/^(vendor_id|cpu family|model|model name|stepping|cpuid level)\s*:\s*(.+)$/) {
[-- Attachment #3: Type: text/plain, Size: 153 bytes --]
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [lm-sensors] [PATCH] sensors-detect : Fixing use of uninitialised value 'vendor_id' on ppc64
2013-09-10 11:37 [lm-sensors] [PATCH] sensors-detect : Fixing use of uninitialised value 'vendor_id' on ppc64 Jaromir Capik
@ 2013-09-11 12:07 ` Jean Delvare
0 siblings, 0 replies; 2+ messages in thread
From: Jean Delvare @ 2013-09-11 12:07 UTC (permalink / raw)
To: lm-sensors
Hi Jaromir,
On Tue, 10 Sep 2013 07:37:54 -0400 (EDT), Jaromir Capik wrote:
> 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
>
> The attached patch fixes that.
>
> Please, merge.
Thanks for reporting. I don't think sensors-detect is terribly useful
on PPC64, but the fix is simple enough so can can take it. I have
committed a slightly different variant:
http://www.lm-sensors.org/changeset/6196
Thanks for your contribution.
--
Jean Delvare
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-09-11 12:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-10 11:37 [lm-sensors] [PATCH] sensors-detect : Fixing use of uninitialised value 'vendor_id' on ppc64 Jaromir Capik
2013-09-11 12:07 ` Jean Delvare
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.