]> git.ipfire.org Git - thirdparty/qemu.git/commit
block: Fix VM size field width in snapshot dump
authorMax Reitz <mreitz@redhat.com>
Fri, 17 Jan 2020 10:58:58 +0000 (11:58 +0100)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Mon, 22 Jun 2020 17:50:32 +0000 (12:50 -0500)
commit0b487ea66409be1984ed55d3de71000ac363644f
tree8263bb7fca3ad63eaf2040b6d7b581eb18157b77
parent3dd28c8ecc2fe3907fe0b096b4b715c106989542
block: Fix VM size field width in snapshot dump

When printing the snapshot list (e.g. with qemu-img snapshot -l), the VM
size field is only seven characters wide.  As of de38b5005e9, this is
not necessarily sufficient: We generally print three digits, and this
may require a decimal point.  Also, the unit field grew from something
as plain as "M" to " MiB".  This means that number and unit may take up
eight characters in total; but we also want spaces in front.

Considering previously the maximum width was four characters and the
field width was chosen to be three characters wider, let us adjust the
field width to be eleven now.

Fixes: de38b5005e946aa3714963ea4c501e279e7d3666
Buglink: https://bugs.launchpad.net/qemu/+bug/1859989
Signed-off-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20200117105859.241818-2-mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
(cherry picked from commit 804359b8b90f76d9d8fbe8d85a6544b68f107f10)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
block/qapi.c