summaryrefslogtreecommitdiffstats
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
parentaca4c306be5e8d757fbac86c9de3f6f3862cc471 (diff)
downloaddrakx-dd565d0c93639079355387546e55a9c615662760.tar
drakx-dd565d0c93639079355387546e55a9c615662760.tar.gz
drakx-dd565d0c93639079355387546e55a9c615662760.tar.bz2
drakx-dd565d0c93639079355387546e55a9c615662760.tar.xz
drakx-dd565d0c93639079355387546e55a9c615662760.zip
(availableRamMB): cleanup
-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();