qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>, qemu-block@nongnu.org
Cc: vsementsov@virtuozzo.com, qemu-devel@nongnu.org
Subject: Re: [PATCH] block: Fix VM size column width in bdrv_snapshot_dump()
Date: Tue, 2 Feb 2021 10:18:24 -0600	[thread overview]
Message-ID: <fdc60cf3-dc7d-d1d7-7cb1-975bcf9ca089@redhat.com> (raw)
In-Reply-To: <20210202155911.179865-1-kwolf@redhat.com>

On 2/2/21 9:59 AM, Kevin Wolf wrote:
> size_to_str() can return a size like "4.24 MiB", with a single digit
> integer part and two fractional digits. This is eight characters, but
> commit b39847a5 changed the format string to only reserve seven
> characters for the column.
> 
> This can result in unaligned columns, which in turn changes the output of
> iotests case 267 because exceeding the column size defeats the attempt
> to filter the size out of the output (observed with the ppc64 emulator).
> The resulting change is only a whitespace change, but since commit
> f203080b this is enough for iotests to consider the test failed.
> 
> Taking a character away from the tag name column and adding it to the VM
> size column doesn't change anything in the common case (the tag name is
> left justified, the VM size is right justified), but fixes this case.
> 
> Fixes: b39847a50553b7679d6d7fefbe6a108a17aacf8d
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
>  block/qapi.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 

Reviewed-by: Eric Blake <eblake@redhat.com>

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org



  reply	other threads:[~2021-02-02 16:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-02 15:59 [PATCH] block: Fix VM size column width in bdrv_snapshot_dump() Kevin Wolf
2021-02-02 16:18 ` Eric Blake [this message]
2021-02-02 16:26 ` Vladimir Sementsov-Ogievskiy

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=fdc60cf3-dc7d-d1d7-7cb1-975bcf9ca089@redhat.com \
    --to=eblake@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=vsementsov@virtuozzo.com \
    /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).