From: Jan Kiszka <jan.kiszka@web.de>
To: Mark McLoughlin <markmc@redhat.com>
Cc: Markus Armbruster <armbru@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] Drop config_error(), use qemu_error() instead
Date: Wed, 23 Sep 2009 17:12:26 +0200 [thread overview]
Message-ID: <4ABA3ADA.9070404@web.de> (raw)
In-Reply-To: <1253619422.6528.5.camel@blaa>
[-- Attachment #1: Type: text/plain, Size: 1462 bytes --]
Mark McLoughlin wrote:
> On Sat, 2009-09-12 at 01:03 +0200, Markus Armbruster wrote:
>
>> There's one user-visible difference: config_error() prepended "qemu: "
>> to a message bound for stderr. qemu_error() doesn't, which means the
>> prefix goes away with this commit.
> ...
>> ---
>> net.c | 128 ++++++++++++++++++++++++++++-------------------------------------
>> 1 files changed, 55 insertions(+), 73 deletions(-)
>>
>> diff --git a/net.c b/net.c
>> index 4510694..e88919b 100644
>> --- a/net.c
>> +++ b/net.c
>> @@ -641,21 +641,6 @@ qemu_sendv_packet(VLANClientState *vc, const struct iovec *iov, int iovcnt)
>> return qemu_sendv_packet_async(vc, iov, iovcnt, NULL);
>> }
>>
>> -static void config_error(Monitor *mon, const char *fmt, ...)
>> -{
>> - va_list ap;
>> -
>> - va_start(ap, fmt);
>> - if (mon) {
>> - monitor_vprintf(mon, fmt, ap);
>> - } else {
>> - fprintf(stderr, "qemu: ");
>> - vfprintf(stderr, fmt, ap);
>> - exit(1);
>
> There's another difference, actually - qemu_error() doesn't abort when
> printing an error to stderr
>
> I'm fine with that, but could you check all callers to make sure that's
> sane?
Valid remark. I think the effect will be that we continue with parameter
evaluation or even VM startup even though parts of the setup failed /
was skipped. May produce funny subsequent errors that will only confuse
the user.
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]
next prev parent reply other threads:[~2009-09-23 15:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-11 23:03 [Qemu-devel] [PATCH] Drop config_error(), use qemu_error() instead Markus Armbruster
2009-09-22 11:37 ` Mark McLoughlin
2009-09-23 15:12 ` Jan Kiszka [this message]
2009-09-25 23:03 ` Markus Armbruster
-- strict thread matches above, loose matches on Subject: below --
2009-10-06 11:16 [Qemu-devel] [PATCH 00/19 v3] Port -net to QemuOpts Mark McLoughlin
2009-10-06 11:16 ` [Qemu-devel] [PATCH] Drop config_error(), use qemu_error() instead Mark McLoughlin
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=4ABA3ADA.9070404@web.de \
--to=jan.kiszka@web.de \
--cc=armbru@redhat.com \
--cc=markmc@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).