summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2002-10-16 13:55:33 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2002-10-16 13:55:33 +0000
commitee124ddcc47e9c953b2d5f01caf70b1817a565db (patch)
tree4874c2e76720a57479983dc5c73b33d4aa83155e /perl-install
parent10fc76dd0601c21b35df24b36cb4a289543ca4a5 (diff)
downloaddrakx-backup-do-not-use-ee124ddcc47e9c953b2d5f01caf70b1817a565db.tar
drakx-backup-do-not-use-ee124ddcc47e9c953b2d5f01caf70b1817a565db.tar.gz
drakx-backup-do-not-use-ee124ddcc47e9c953b2d5f01caf70b1817a565db.tar.bz2
drakx-backup-do-not-use-ee124ddcc47e9c953b2d5f01caf70b1817a565db.tar.xz
drakx-backup-do-not-use-ee124ddcc47e9c953b2d5f01caf70b1817a565db.zip
getCPUs() : fix multiples cpu detection
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/detect_devices.pm8
1 files changed, 3 insertions, 5 deletions
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm
index ace2d12cb..1afd3c7f9 100644
--- a/perl-install/detect_devices.pm
+++ b/perl-install/detect_devices.pm
@@ -350,13 +350,11 @@ sub getCPUs {
my (@cpus, $cpu);
foreach (cat_("/proc/cpuinfo")) {
if (/^processor/) {
- next unless $cpu;
- push @cpus, $cpu;
+ push @cpus, $cpu if $cpu;
$cpu = {};
- } else {
- /(\S*)\s*:\s*(\S*)/;
- $cpu->{$1} = $2 if $1;
}
+ /(\S*)\s*:\s*(\S*)/;
+ $cpu->{$1} = $2 if $1;
}
push @cpus, $cpu;
@cpus;