while some people write percentages as 0.XX , putting a % next to that is just
confusing. also, combined with the format modifier this would be rather lossy,
and also not match regular `df` output..

Signed-off-by: Fabian Grünbichler <[email protected]>
---
 src/PVE/CLI/pct.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/PVE/CLI/pct.pm b/src/PVE/CLI/pct.pm
index c48321d..4504b54 100755
--- a/src/PVE/CLI/pct.pm
+++ b/src/PVE/CLI/pct.pm
@@ -433,7 +433,7 @@ __PACKAGE__->register_method({
                    my $used = $format->($df->{used});
                    my $avail = $format->($df->{avail});
 
-                   my $pc = sprintf('%.1f', $df->{used}/$df->{total});
+                   my $pc = sprintf('%.1f', 100 * $df->{used} / $df->{total});
 
                    my $entry = [ $name, $mp->{volume}, $total, $used, $avail, 
$pc, $path ];
                    push @list, $entry;
-- 
2.39.2



_______________________________________________
pve-devel mailing list
[email protected]
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to