From: Markus Armbruster <armbru@redhat.com>
To: Eduardo Habkost <ehabkost@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
Andrew Jones <drjones@redhat.com>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] vl.c: Replace fprintf(stderr) with error_report()
Date: Mon, 26 Oct 2015 18:43:43 +0100 [thread overview]
Message-ID: <878u6ppltc.fsf@blackfin.pond.sub.org> (raw)
In-Reply-To: <1445879623-8403-1-git-send-email-ehabkost@redhat.com> (Eduardo Habkost's message of "Mon, 26 Oct 2015 15:13:43 -0200")
Eduardo Habkost <ehabkost@redhat.com> writes:
> This replaces most fprintf(stderr) calls on vl.c with error_report().
>
> The trailing newlines, "qemu:" and "error:" message prefixes were
> removed.
Good!
Some of the messages end in a period, which could also be dropped.
Example:
Usage: -virtfs fsdriver,mount_tag=tag.
> The only remaining fprintf(stderr) calls are the ones at
> qemu_kill_report(), because the error mesage is split in multiple
> fprintf() calls.
I think the straightforward solution would be two error_report() calls:
@@ -1624,14 +1624,14 @@ static int qemu_shutdown_requested(void)
static void qemu_kill_report(void)
{
if (!qtest_driver() && shutdown_signal != -1) {
- fprintf(stderr, "qemu: terminating on signal %d", shutdown_signal);
if (shutdown_pid == 0) {
+ error_report("terminating on signal %d", shutdown_signal);
/* This happens for eg ^C at the terminal, so it's worth
* avoiding printing an odd message in that case.
*/
- fputc('\n', stderr);
} else {
- fprintf(stderr, " from pid " FMT_pid "\n", shutdown_pid);
+ error_report("terminating on signal %d from pid" FMT_pid,
+ shutdown_signal, shutdown_pid);
}
shutdown_signal = -1;
}
> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
> ---
> Not sure if this is appropriate post soft-freeze, but if we are going to apply
> the max-cpus patch from Drew before 2.5.0, we could simply change all the
> fprintf() calls in a single step.
I think it is just fine post soft freeze. It's soft, not hard freeze.
Neither of my suggestions is important enough to deny my
Reviewed-by: Markus Armbruster <armbru@redhat.com>
next prev parent reply other threads:[~2015-10-26 17:43 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-26 17:13 [Qemu-devel] [PATCH] vl.c: Replace fprintf(stderr) with error_report() Eduardo Habkost
2015-10-26 17:43 ` Markus Armbruster [this message]
2015-10-26 18:03 ` Eduardo Habkost
2015-10-26 18:21 ` Eduardo Habkost
2015-10-28 18:12 ` Eduardo Habkost
2015-10-29 6:15 ` Markus Armbruster
2015-10-26 19:10 ` Eric Blake
2015-10-27 17:08 ` Eduardo Habkost
2015-10-27 7:30 ` Andrew Jones
2015-10-27 9:53 ` Markus Armbruster
2015-10-27 19:25 ` Eduardo Habkost
2015-10-27 19:36 ` Laszlo Ersek
2015-10-28 13:58 ` Andrew Jones
2015-10-28 15:27 ` Laszlo Ersek
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=878u6ppltc.fsf@blackfin.pond.sub.org \
--to=armbru@redhat.com \
--cc=drjones@redhat.com \
--cc=ehabkost@redhat.com \
--cc=pbonzini@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.