summaryrefslogtreecommitdiffstats
path: root/perl-install/common.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2001-02-08 12:17:31 +0000
committerPascal Rigaux <pixel@mandriva.com>2001-02-08 12:17:31 +0000
commitdd565d0c93639079355387546e55a9c615662760 (patch)
tree6e942be4119f483a9de0bfc7bbc326669801edb6 /perl-install/common.pm
parentaca4c306be5e8d757fbac86c9de3f6f3862cc471 (diff)
downloaddrakx-backup-do-not-use-dd565d0c93639079355387546e55a9c615662760.tar
drakx-backup-do-not-use-dd565d0c93639079355387546e55a9c615662760.tar.gz
drakx-backup-do-not-use-dd565d0c93639079355387546e55a9c615662760.tar.bz2
drakx-backup-do-not-use-dd565d0c93639079355387546e55a9c615662760.tar.xz
drakx-backup-do-not-use-dd565d0c93639079355387546e55a9c615662760.zip
(availableRamMB): cleanup
Diffstat (limited to 'perl-install/common.pm')
-rw-r--r--perl-install/common.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/perl-install/common.pm b/perl-install/common.pm
index 350591534..3bf3c7e0f 100644
--- a/perl-install/common.pm
+++ b/perl-install/common.pm
@@ -577,7 +577,7 @@ sub typeFromMagic($@) {
sub availableMemory() { sum map { /(\d+)/ } grep { /^(MemTotal|SwapTotal):/ } cat_("/proc/meminfo"); }
sub availableRamMB() {
- my $s = 4 * int ((stat("/proc/kcore"))[7] / 1024 / 1024 / 4 + 0.5);
+ my $s = 4 * round((-s '/proc/kcore') / 1024 / 1024 / 4);
#- HACK HACK: if i810 and memsize
require detect_devices;
return $s - 1 if $s == 128 && grep { $_->{driver} =~ /i810/ } detect_devices::probeall();