require '/var/ipfire/general-functions.pl';
require "${General::swroot}/lang.pl";
require "${General::swroot}/header.pl";
+require "${General::swroot}/btrfs-functions.pl";
require "/opt/pakfire/lib/functions.pl";
my %cgiparams=();
# Splitt processed line and assign some nice humand-readable values.
my($dev, $blocks_1k, $used, $available, $used_percent, $mpoint) = split(/\s+/, $line);
+ # Check if the current processed disk has BTRFS.
+ if (&BTRFS::is_btrfs($mpoint)) {
+ # Call the corresponding function from BTRFS module to gather the
+ # correct remaining free space in percent.
+ $used_percent = &BTRFS::free_space($mpoint, "percent");
+ }
+
# Check if more than 90% of disk is consumed.
if ($used_percent > 90) {
# Calculate remain free space.