summaryrefslogtreecommitdiffstats
path: root/perl-install/common.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2000-10-04 00:30:29 +0000
committerPascal Rigaux <pixel@mandriva.com>2000-10-04 00:30:29 +0000
commit1237406e5ee90da9dbdfec9fce21d603f75c80a6 (patch)
treef9b071d99afeccf9ef1c029cd08724b24919d91f /perl-install/common.pm
parenta8fff3fb88fd5d727ab14812673dbed47541593e (diff)
downloaddrakx-backup-do-not-use-1237406e5ee90da9dbdfec9fce21d603f75c80a6.tar
drakx-backup-do-not-use-1237406e5ee90da9dbdfec9fce21d603f75c80a6.tar.gz
drakx-backup-do-not-use-1237406e5ee90da9dbdfec9fce21d603f75c80a6.tar.bz2
drakx-backup-do-not-use-1237406e5ee90da9dbdfec9fce21d603f75c80a6.tar.xz
drakx-backup-do-not-use-1237406e5ee90da9dbdfec9fce21d603f75c80a6.zip
no_comment
Diffstat (limited to 'perl-install/common.pm')
-rw-r--r--perl-install/common.pm8
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 = '';