Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MrW0S-0006E9-Nm for qemu-devel@nongnu.org; Sat, 26 Sep 2009 08:04:04 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MrW0O-0006CX-1C for qemu-devel@nongnu.org; Sat, 26 Sep 2009 08:04:04 -0400 Received: from [199.232.76.173] (port=37876 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MrW0N-0006CU-Sq for qemu-devel@nongnu.org; Sat, 26 Sep 2009 08:03:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42419) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MrW0N-0003XC-5e for qemu-devel@nongnu.org; Sat, 26 Sep 2009 08:03:59 -0400 Subject: Re: [Qemu-devel] [PATCH] Drop config_error(), use qemu_error() instead References: <87hbv96q4d.fsf@pike.pond.sub.org> <1253619422.6528.5.camel@blaa> From: Markus Armbruster Date: Sat, 26 Sep 2009 01:03:56 +0200 In-Reply-To: <1253619422.6528.5.camel@blaa> (Mark McLoughlin's message of "Tue\, 22 Sep 2009 12\:37\:02 +0100") Message-ID: <877hvmhbj7.fsf@pike.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Mark McLoughlin Cc: Jan Kiszka , qemu-devel@nongnu.org Mark McLoughlin 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!