qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Abhiram Tilak <atp.exp@gmail.com>
Cc: qemu-devel@nongnu.org, hreitz@redhat.com
Subject: Re: [PATCH v3] qemu-img: Fix Column Width and Improve Formatting in snapshot list
Date: Thu, 18 Jan 2024 20:43:00 +0100	[thread overview]
Message-ID: <Zal_RMi4wmLGj6k9@redhat.com> (raw)
In-Reply-To: <20240111172546.823263-1-atp.exp@gmail.com>

Am 11.01.2024 um 18:25 hat Abhiram Tilak geschrieben:
> 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>

We can tweak the format a bit, but then we need to save those two
characters somewhere else so that the output still fits in 80
characters. We can probably reduce the size of the ID column.

Maybe what we should also do is decreasing the width of each field by
one and instead writing a space character into the format string. So if
we ever use up the space for one of the fields again, we would lose the
nice column alignment, but you could still recognise the individual
fields.

Kevin



  reply	other threads:[~2024-01-18 19:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-11 17:25 [PATCH v3] qemu-img: Fix Column Width and Improve Formatting in snapshot list Abhiram Tilak
2024-01-18 19:43 ` Kevin Wolf [this message]
2024-01-22 13:26   ` atp exp
2024-01-22 15:59     ` Kevin Wolf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Zal_RMi4wmLGj6k9@redhat.com \
    --to=kwolf@redhat.com \
    --cc=atp.exp@gmail.com \
    --cc=hreitz@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).