]> git.proxmox.com Git - pve-common.git/commitdiff
followup: avoid very long line through comment moval
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 12 Nov 2019 13:16:01 +0000 (14:16 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 12 Nov 2019 13:16:01 +0000 (14:16 +0100)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/PVE/Tools.pm

index 89de4ecff288a048447063a55311453b2865098c..db4cdf72a6a6ad21d6f3469f6c82b7efff522bde 100644 (file)
@@ -1007,8 +1007,8 @@ sub df {
     my $res = eval { run_fork_with_timeout($timeout, $df) } // {};
     warn $@ if $@;
 
     my $res = eval { run_fork_with_timeout($timeout, $df) } // {};
     warn $@ if $@;
 
-    # untaint the values
-    my ($blocks, $used, $bavail) = map { defined($_) ? (/^([\d\.e\-+]+)$/) : 0 } # can be in scientific notation
+    # untaint, but be flexible: PB usage can result in scientific notation
+    my ($blocks, $used, $bavail) = map { defined($_) ? (/^([\d\.e\-+]+)$/) : 0 }
        $res->@{qw(blocks used bavail)};
 
     return {
        $res->@{qw(blocks used bavail)};
 
     return {