]> xenbits.xensource.com Git - qemu-xen.git/commit
qemu-img: Fix Column Width and Improve Formatting in snapshot list
authorAbhiram Tilak <atp.exp@gmail.com>
Tue, 23 Jan 2024 05:03:55 +0000 (10:33 +0530)
committerKevin Wolf <kwolf@redhat.com>
Mon, 18 Mar 2024 12:30:34 +0000 (13:30 +0100)
commit52df1a5b613a06273e92e926a242af69f3f39871
tree4d4d0343b6b36939134c0ce787908e7c80fbbcab
parent7fcb8c89f063122864bd274fd673a70a0a802d93
qemu-img: Fix Column Width and Improve Formatting in snapshot list

When running the command `qemu-img snapshot -l SNAPSHOT` the output of
VM_CLOCK (measures the offset between host and VM clock) cannot to
accommodate values in the order of thousands (4-digit).

This line [1] hints on the problem. Additionally, the column width for
the VM_CLOCK field was reduced from 15 to 13 spaces in commit b39847a5
in line [2], resulting in a shortage of space.

[1]:
https://gitlab.com/qemu-project/qemu/-/blob/master/block/qapi.c?ref_type=heads#L753
[2]:
https://gitlab.com/qemu-project/qemu/-/blob/master/block/qapi.c?ref_type=heads#L763

This patch restores the column width to 15 spaces and makes adjustments
to the affected iotests accordingly. Furthermore, addresses a potential
source
of confusion by removing whitespace in column headers. Example, VM CLOCK
is modified to VM_CLOCK. Additionally a '--' symbol is introduced when
ICOUNT returns no output for clarity.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2062
Fixes: b39847a50553 ("migration: introduce icount field for snapshots")
Signed-off-by: Abhiram Tilak <atp.exp@gmail.com>
Message-ID: <20240123050354.22152-2-atp.exp@gmail.com>
[kwolf: Fixed up qemu-iotests 261 and 286]
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/qapi.c
tests/qemu-iotests/176.out
tests/qemu-iotests/261
tests/qemu-iotests/267.out
tests/qemu-iotests/286
tests/qemu-iotests/286.out
tests/qemu-iotests/tests/qcow2-internal-snapshots.out