summaryrefslogtreecommitdiffstats
path: root/perl-install/install_any.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2000-05-19 17:15:36 +0000
committerFrancois Pons <fpons@mandriva.com>2000-05-19 17:15:36 +0000
commitde7d4baf2978f851c572282fe54355c94c69259e (patch)
tree1b17e14b7dfbeca165e18120a2bfbd2cc16e0727 /perl-install/install_any.pm
parent36b067adfbe069090b8593cbfa9c8c2e5f016656 (diff)
downloaddrakx-de7d4baf2978f851c572282fe54355c94c69259e.tar
drakx-de7d4baf2978f851c572282fe54355c94c69259e.tar.gz
drakx-de7d4baf2978f851c572282fe54355c94c69259e.tar.bz2
drakx-de7d4baf2978f851c572282fe54355c94c69259e.tar.xz
drakx-de7d4baf2978f851c572282fe54355c94c69259e.zip
*** empty log message ***
Diffstat (limited to 'perl-install/install_any.pm')
-rw-r--r--perl-install/install_any.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index f953785b6..9e02cb149 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -238,9 +238,11 @@ sub getAvailableSpace {
sub getAvailableSpace_mounted {
my ($prefix) = @_;
my $buf = ' ' x 20000;
- syscall_('statfs', "$prefix/usr", $buf) or return;
+ my $dir = -d "$prefix/usr" ? "$prefix/usr" : "$prefix";
+ syscall_('statfs', $dir, $buf) or return;
my (undef, $blocksize, $size, undef, $free, undef) = unpack "L2L4", $buf;
- ($free || 1) * $blocksize;
+ log::l("space free on $dir is $free blocks of $blocksize bytes");
+ $free * $blocksize || 1;
}
sub getAvailableSpace_raw {
my ($fstab) = @_;