[pve-devel] [PATCH manager 2/5] vzdump: use verbose size suffix when logging archive file size
Fiona Ebner
f.ebner at proxmox.com
Mon May 12 14:41:26 CEST 2025
The single-letter suffixes are ambiguous and especially in the context
of disks, the powers of ten are usually used. Use exact suffixes
instead when logging the archive file size.
Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
---
PVE/VZDump.pm | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/PVE/VZDump.pm b/PVE/VZDump.pm
index 58fa0f64..a7143926 100644
--- a/PVE/VZDump.pm
+++ b/PVE/VZDump.pm
@@ -235,19 +235,19 @@ sub format_size {
my $kb = $size / 1024;
if ($kb < 1024) {
- return int ($kb) . "KB";
+ return int ($kb) . "KiB";
}
my $mb = $size / (1024*1024);
if ($mb < 1024) {
- return int ($mb) . "MB";
+ return int ($mb) . "MiB";
}
my $gb = $mb / 1024;
if ($gb < 1024) {
- return sprintf ("%.2fGB", $gb);
+ return sprintf ("%.2fGiB", $gb);
}
my $tb = $gb / 1024;
- return sprintf ("%.2fTB", $tb);
+ return sprintf ("%.2fTiB", $tb);
}
sub format_time {
--
2.39.5
More information about the pve-devel
mailing list