qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] Drop config_error(), use qemu_error() instead


From: Jan Kiszka
Subject: Re: [Qemu-devel] [PATCH] Drop config_error(), use qemu_error() instead
Date: Wed, 23 Sep 2009 17:12:26 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666

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: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]