From ee124ddcc47e9c953b2d5f01caf70b1817a565db Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Wed, 16 Oct 2002 13:55:33 +0000 Subject: getCPUs() : fix multiples cpu detection --- perl-install/detect_devices.pm | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'perl-install/detect_devices.pm') 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; -- cgit v1.2.1