mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-07-09 09:14:18 +00:00
image convert: use human-readable units in progress report
similar to what driver mirror monitor was changed too Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
fd70c84362
commit
b5e9d97bdf
@ -6960,9 +6960,10 @@ sub qemu_img_convert {
|
|||||||
if($line =~ m/\((\S+)\/100\%\)/){
|
if($line =~ m/\((\S+)\/100\%\)/){
|
||||||
my $percent = $1;
|
my $percent = $1;
|
||||||
my $transferred = int($size * $percent / 100);
|
my $transferred = int($size * $percent / 100);
|
||||||
my $remaining = $size - $transferred;
|
my $total_h = render_bytes($size, 1);
|
||||||
|
my $transferred_h = render_bytes($transferred, 1);
|
||||||
|
|
||||||
print "transferred: $transferred bytes remaining: $remaining bytes total: $size bytes progression: $percent %\n";
|
print "transferred $transferred_h of $total_h ($percent%)";
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user