diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2000-10-04 00:30:29 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2000-10-04 00:30:29 +0000 |
commit | 1237406e5ee90da9dbdfec9fce21d603f75c80a6 (patch) | |
tree | f9b071d99afeccf9ef1c029cd08724b24919d91f /perl-install/common.pm | |
parent | a8fff3fb88fd5d727ab14812673dbed47541593e (diff) | |
download | drakx-1237406e5ee90da9dbdfec9fce21d603f75c80a6.tar drakx-1237406e5ee90da9dbdfec9fce21d603f75c80a6.tar.gz drakx-1237406e5ee90da9dbdfec9fce21d603f75c80a6.tar.bz2 drakx-1237406e5ee90da9dbdfec9fce21d603f75c80a6.tar.xz drakx-1237406e5ee90da9dbdfec9fce21d603f75c80a6.zip |
no_comment
Diffstat (limited to 'perl-install/common.pm')
-rw-r--r-- | perl-install/common.pm | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/perl-install/common.pm b/perl-install/common.pm index b3a6b05e5..2232048f6 100644 --- a/perl-install/common.pm +++ b/perl-install/common.pm @@ -571,7 +571,13 @@ sub typeFromMagic($@) { } sub availableMemory() { sum map { /(\d+)/ } grep { /^(MemTotal|SwapTotal):/ } cat_("/proc/meminfo"); } -sub availableRamMB() { 4 * int ((stat("/proc/kcore"))[7] / 1024 / 1024 / 4 + 0.5) } +sub availableRamMB() { + my $s = 4 * int ((stat("/proc/kcore"))[7] / 1024 / 1024 / 4 + 0.5); + #- HACK HACK: if i810 and memsize + require detect_devices; + return $s - 1 if $s == 128 && grep { $_->{driver} =~ /i810/ } detect_devices::probeall(); + $s; +} sub setVirtual($) { my $vt = ''; |