All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jaromir Capik <jcapik@redhat.com>
To: lm-sensors@vger.kernel.org
Subject: [lm-sensors] [PATCH] sensors-detect : Fixing use of uninitialised value 'vendor_id' on ppc64
Date: Tue, 10 Sep 2013 11:37:54 +0000	[thread overview]
Message-ID: <1301926956.10694212.1378813074661.JavaMail.root@redhat.com> (raw)

[-- 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

             reply	other threads:[~2013-09-10 11:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-10 11:37 Jaromir Capik [this message]
2013-09-11 12:07 ` [lm-sensors] [PATCH] sensors-detect : Fixing use of uninitialised value 'vendor_id' on ppc64 Jean Delvare

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1301926956.10694212.1378813074661.JavaMail.root@redhat.com \
    --to=jcapik@redhat.com \
    --cc=lm-sensors@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.