[pve-devel] [PATCH manager v3 3/6] vzdump: use verbose size suffix when logging archive file size
Fiona Ebner
f.ebner at proxmox.com
Wed Jul 23 13:57:38 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 cf71a9fa..d7cce65c 100644
--- a/PVE/VZDump.pm
+++ b/PVE/VZDump.pm
@@ -240,19 +240,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.47.2
More information about the pve-devel
mailing list