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: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH] Drop config_error(), use qemu_error() instead
Date: Sat, 26 Sep 2009 01:03:56 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (gnu/linux)

Mark McLoughlin <address@hidden> writes:

> 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?

I meant to do that, but it somehow slipped my mind.  I had a quick look,
and I think I dropped error exits on some call chains.  I need to redo
this patch.

Thanks!




reply via email to

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