summaryrefslogtreecommitdiffstats
path: root/perl-install/detect_devices.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-09-09 09:54:02 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-09-09 09:54:02 +0000
commit333cd0d93d4d4fd22d4c6553207a01e7a4d9079f (patch)
tree2c98f605b39811688b1797dc37eb5bdad266d8f0 /perl-install/detect_devices.pm
parent14d4659ed34b4a4883b7d54ce0a3ed7c814d264d (diff)
downloaddrakx-backup-do-not-use-333cd0d93d4d4fd22d4c6553207a01e7a4d9079f.tar
drakx-backup-do-not-use-333cd0d93d4d4fd22d4c6553207a01e7a4d9079f.tar.gz
drakx-backup-do-not-use-333cd0d93d4d4fd22d4c6553207a01e7a4d9079f.tar.bz2
drakx-backup-do-not-use-333cd0d93d4d4fd22d4c6553207a01e7a4d9079f.tar.xz
drakx-backup-do-not-use-333cd0d93d4d4fd22d4c6553207a01e7a4d9079f.zip
add is_i586() based on "cpu family", hopefully it works for detecting K6 and C3
Diffstat (limited to 'perl-install/detect_devices.pm')
-rw-r--r--perl-install/detect_devices.pm4
1 files changed, 4 insertions, 0 deletions
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm
index ab706e76d..47d027e1e 100644
--- a/perl-install/detect_devices.pm
+++ b/perl-install/detect_devices.pm
@@ -771,6 +771,10 @@ sub isLaptop() {
|| cat_('/proc/cpuinfo') =~ /\bmobile\b/i;
}
+sub is_i586() {
+ cat_('/proc/cpuinfo') =~ /^cpu family\s*:\s*(\d+)/m && $1 < 6;
+}
+
sub matching_type {
my ($type) = @_;
$type =~ /laptop/i && isLaptop();