All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>
Cc: jiri@resnulli.us, ehabkost@redhat.com, david@redhat.com,
	groug@kaod.org, qemu-devel@nongnu.org, jcmvbkbc@gmail.com
Subject: Re: [PATCH] Trim some trailing space from human-readable output
Date: Tue, 12 Oct 2021 06:48:48 +0200	[thread overview]
Message-ID: <87wnmionkf.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <a3e15dc2-5c33-d785-7bb8-b70e1722ce3f@redhat.com> ("Philippe Mathieu-Daudé"'s message of "Tue, 12 Oct 2021 00:28:06 +0200")

Philippe Mathieu-Daudé <philmd@redhat.com> writes:

> On 10/9/21 17:24, 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(-)
>
> Nitpicking, do you mind prefixing the patch subject with 'monitor:'?

You're right, the code I patch is called from HMP commands, and probably
not from anywhere else.

> Otherwise:
> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>

Thanks!



  reply	other threads:[~2021-10-12  4:49 UTC|newest]

Thread overview: 10+ 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
2021-10-11 12:33 ` Greg Kurz
2021-10-11 22:28 ` Philippe Mathieu-Daudé
2021-10-12  4:48   ` Markus Armbruster [this message]
2021-10-11 22:35 ` Max Filippov
2021-10-25  9:12 ` Markus Armbruster
2021-10-25  9:12   ` Markus Armbruster
2021-10-25  9:17   ` Laurent Vivier
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=87wnmionkf.fsf@dusky.pond.sub.org \
    --to=armbru@redhat.com \
    --cc=david@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=groug@kaod.org \
    --cc=jcmvbkbc@gmail.com \
    --cc=jiri@resnulli.us \
    --cc=philmd@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.