summaryrefslogtreecommitdiffstats
path: root/urpm/sys.pm
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@mandriva.com>2009-10-13 17:00:07 +0000
committerChristophe Fergeau <cfergeau@mandriva.com>2009-10-13 17:00:07 +0000
commitd002866b9f38035f7847b4f1b79282edfb6b0594 (patch)
treece8d6e23cc32b0eed4906131c9ecdd9d2c694100 /urpm/sys.pm
parent23dfdc48383c53af28c1dc4557d22602107d5b18 (diff)
downloadurpmi-d002866b9f38035f7847b4f1b79282edfb6b0594.tar
urpmi-d002866b9f38035f7847b4f1b79282edfb6b0594.tar.gz
urpmi-d002866b9f38035f7847b4f1b79282edfb6b0594.tar.bz2
urpmi-d002866b9f38035f7847b4f1b79282edfb6b0594.tar.xz
urpmi-d002866b9f38035f7847b4f1b79282edfb6b0594.zip
add df function to urpm/sys.pm
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) = @_;