qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: Markus Armbruster <armbru@redhat.com>, qemu-devel@nongnu.org
Cc: jcmvbkbc@gmail.com, groug@kaod.org, jiri@resnulli.us,
	ehabkost@redhat.com, david@redhat.com
Subject: Re: [PATCH] Trim some trailing space from human-readable output
Date: Sat, 9 Oct 2021 09:07:44 -0700	[thread overview]
Message-ID: <25d961c4-610f-8c57-d4b2-7989c4c78a59@linaro.org> (raw)
In-Reply-To: <20211009152401.2982862-1-armbru@redhat.com>

On 10/9/21 8:24 AM, Markus Armbruster wrote:
> I noticed -cpu help printing enough trailing spaces to make the output
> at least 84 characters wide.  Looks ugly unless the terminal is wider.
> Ugly or not, trailing spaces are stupid.
> 
> The culprit is this line in x86_cpu_list_entry():
> 
>      qemu_printf("x86 %-20s  %-58s\n", name, desc);
> 
> This prints a string with minimum field left-justified right before a
> newline.  Change it to
> 
>      qemu_printf("x86 %-20s  %s\n", name, desc);
> 
> which avoids the trailing spaces and is simpler to boot.
> 
> A search for the pattern with "git-grep -E '%-[0-9]+s\\n'" found a few
> more instances.  Change them similarly.
> 
> Signed-off-by: Markus Armbruster<armbru@redhat.com>
> ---
>   monitor/hmp-cmds.c         | 2 +-
>   target/i386/cpu-dump.c     | 4 ++--
>   target/i386/cpu.c          | 2 +-
>   target/ppc/cpu_init.c      | 2 +-
>   target/s390x/cpu_models.c  | 4 ++--
>   target/xtensa/mmu_helper.c | 2 +-
>   6 files changed, 8 insertions(+), 8 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~


  reply	other threads:[~2021-10-09 16:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-09 15:24 [PATCH] Trim some trailing space from human-readable output Markus Armbruster
2021-10-09 16:07 ` Richard Henderson [this message]
2021-10-11 12:33 ` Greg Kurz
2021-10-11 22:28 ` Philippe Mathieu-Daudé
2021-10-12  4:48   ` Markus Armbruster
2021-10-11 22:35 ` Max Filippov
2021-10-25  9:12 ` Markus Armbruster
2021-10-25  9:17   ` Laurent Vivier

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=25d961c4-610f-8c57-d4b2-7989c4c78a59@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=armbru@redhat.com \
    --cc=david@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=groug@kaod.org \
    --cc=jcmvbkbc@gmail.com \
    --cc=jiri@resnulli.us \
    --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).