From 7529eee43fe1f250fb3f81a45c6140a62a348656 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwenol=C3=A9=20Beauchesne?= Date: Tue, 5 Nov 2002 18:33:37 +0000 Subject: Detect SMP more easily if we have APIC stuff capable --- perl-install/detect_devices.pm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm index c60e356c2..05e7eaccb 100644 --- a/perl-install/detect_devices.pm +++ b/perl-install/detect_devices.pm @@ -478,7 +478,15 @@ sub get_mac_generation() { return "Unknown Generation"; } -sub hasSMP { c::detectSMP() } +sub hasSMP { + # Much simpler if we have APIC stuff + foreach (syslog()) { + my ($nprocs) = m/Processors: (\d+)/ or next; + return $nprocs > 1 ? 1 : 0; + } + c::detectSMP() +} + sub hasPCMCIA { $::o->{pcmcia} } #- because /proc/pcmcia seems not to be present on 2.4 at least (or use /var/run/stab) #- try to detect a laptop, we assume pcmcia service is an indication of a laptop or -- cgit v1.2.1