From: Eduardo Habkost <ehabkost@redhat.com>
To: qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>,
Andrew Jones <drjones@redhat.com>,
Markus Armbruster <armbru@redhat.com>
Subject: [Qemu-devel] [PATCH v3 02/11] vl.c: Use error_report() when reporting shutdown signal
Date: Fri, 30 Oct 2015 13:07:53 -0200 [thread overview]
Message-ID: <1446217682-24421-3-git-send-email-ehabkost@redhat.com> (raw)
In-Reply-To: <1446217682-24421-1-git-send-email-ehabkost@redhat.com>
This usage of fprintf(stderr) can't be directly converted to
error_report() like the others, because a single error message is split
into multiple fprintf() calls. Make separate error_report() calls for
each case.
Suggested-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
vl.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/vl.c b/vl.c
index 4ee460f..447cb9a 100644
--- a/vl.c
+++ b/vl.c
@@ -1626,14 +1626,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) {
/* This happens for eg ^C at the terminal, so it's worth
* avoiding printing an odd message in that case.
*/
- fputc('\n', stderr);
+ error_report("terminating on signal %d", shutdown_signal);
} 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;
}
--
2.1.0
next prev parent reply other threads:[~2015-10-30 15:08 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-30 15:07 [Qemu-devel] [PATCH v3 00/11] vl.c: Error message rework Eduardo Habkost
2015-10-30 15:07 ` [Qemu-devel] [PATCH v3 01/11] vl.c: Replace fprintf(stderr) with error_report() Eduardo Habkost
2015-10-30 15:07 ` Eduardo Habkost [this message]
2015-10-30 15:07 ` [Qemu-devel] [PATCH v3 03/11] vl.c: Remove periods and exclamation points from error messages Eduardo Habkost
2015-10-30 15:07 ` [Qemu-devel] [PATCH v3 04/11] vl.c: Use "warning:" prefix consistently on warnings Eduardo Habkost
2015-10-30 15:07 ` [Qemu-devel] [PATCH v3 05/11] vl.c: Use "cannot" instead of "can not" in error messages Eduardo Habkost
2015-10-30 15:07 ` [Qemu-devel] [PATCH v3 06/11] vl.c: Use 'quotes' instead of `quotes' in messages Eduardo Habkost
2015-10-30 15:07 ` [Qemu-devel] [PATCH v3 07/11] vl.c: Remove unnecessary uppercase in error messages Eduardo Habkost
2015-10-30 15:07 ` [Qemu-devel] [PATCH v3 08/11] vl.c: Change "fail to parse" error message to "failed to parse" Eduardo Habkost
2015-10-30 15:08 ` [Qemu-devel] [PATCH v3 09/11] vl.c: Simplify "ignoring deprecated option" warnings Eduardo Habkost
2015-10-30 15:08 ` [Qemu-devel] [PATCH v3 10/11] vl.c: Reword -no-kvm-pit-reinjection deprecation warning Eduardo Habkost
2015-10-30 15:08 ` [Qemu-devel] [PATCH v3 11/11] vl.c: Use "%s support is disabled" error messages consistently Eduardo Habkost
2015-10-30 16:23 ` [Qemu-devel] [PATCH v3 00/11] vl.c: Error message rework Markus Armbruster
2015-10-30 17:38 ` Eduardo Habkost
2015-11-03 8:43 ` Markus Armbruster
2015-11-03 16:46 ` Eduardo Habkost
2015-10-30 17:31 ` Eduardo Habkost
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=1446217682-24421-3-git-send-email-ehabkost@redhat.com \
--to=ehabkost@redhat.com \
--cc=armbru@redhat.com \
--cc=drjones@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 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).