From de7d4baf2978f851c572282fe54355c94c69259e Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Fri, 19 May 2000 17:15:36 +0000 Subject: *** empty log message *** --- perl-install/install_any.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'perl-install/install_any.pm') 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) = @_; -- cgit v1.2.1