diff options
author | Francois Pons <fpons@mandriva.com> | 2000-05-19 17:15:36 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2000-05-19 17:15:36 +0000 |
commit | de7d4baf2978f851c572282fe54355c94c69259e (patch) | |
tree | 1b17e14b7dfbeca165e18120a2bfbd2cc16e0727 /perl-install/install_any.pm | |
parent | 36b067adfbe069090b8593cbfa9c8c2e5f016656 (diff) | |
download | drakx-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.pm | 6 |
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) = @_; |