diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2004-11-16 11:33:24 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2004-11-16 11:33:24 +0000 |
commit | 0e7126fdc833d2696c8c70070641300fa2d14285 (patch) | |
tree | 07c7fba33725d0c7da1df122fc5889cf9f69f2ef | |
parent | 1900afe72ad0d4e056022d4f44c4b19f6d19ec76 (diff) | |
download | drakx-backup-do-not-use-0e7126fdc833d2696c8c70070641300fa2d14285.tar drakx-backup-do-not-use-0e7126fdc833d2696c8c70070641300fa2d14285.tar.gz drakx-backup-do-not-use-0e7126fdc833d2696c8c70070641300fa2d14285.tar.bz2 drakx-backup-do-not-use-0e7126fdc833d2696c8c70070641300fa2d14285.tar.xz drakx-backup-do-not-use-0e7126fdc833d2696c8c70070641300fa2d14285.zip |
cleanup get_mac_generation()
-rw-r--r-- | perl-install/detect_devices.pm | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm index 2f303200d..f0456bdc7 100644 --- a/perl-install/detect_devices.pm +++ b/perl-install/detect_devices.pm @@ -763,17 +763,7 @@ sub get_mac_model() { } sub get_mac_generation() { - my $generation = cat_("/proc/cpuinfo") || die "Can't open /proc/cpuinfo"; - my @genarray = split(/\n/, $generation); - my $count = 0; - while ($count <= @genarray) { - if ($genarray[$count] =~ /pmac-generation/) { - @genarray = split(/:/, $genarray[$count]); - return $genarray[1]; - } - $count++; - } - return "Unknown Generation"; + cat_('/proc/cpuinfo') =~ /^pmac-generation\s*:\s*(.*)/m ? $1 : "Unknown Generation"; } sub hasSMP() { |