summaryrefslogtreecommitdiffstats
path: root/urpm/sys.pm
diff options
context:
space:
mode:
Diffstat (limited to 'urpm/sys.pm')
-rw-r--r--urpm/sys.pm8
1 files changed, 8 insertions, 0 deletions
diff --git a/urpm/sys.pm b/urpm/sys.pm
index 248880ce..51b6b771 100644
--- a/urpm/sys.pm
+++ b/urpm/sys.pm
@@ -92,6 +92,14 @@ sub _find_a_mntpoint {
undef;
}
+#- return the size of the partition and its free space in KiB
+sub df {
+ my ($mntpoint) = @_;
+ require Filesys::Df;
+ my $df = Filesys::Df::df("/", 1024); # ask 1kb values
+ @$df{qw(blocks bfree)};
+}
+
sub _expand_symlink {
my ($pdir) = @_;