From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46136) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zqm77-0007dA-9C for qemu-devel@nongnu.org; Mon, 26 Oct 2015 14:03:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zqm72-0008Dy-9z for qemu-devel@nongnu.org; Mon, 26 Oct 2015 14:03:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36195) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zqm72-0008Dt-4X for qemu-devel@nongnu.org; Mon, 26 Oct 2015 14:03:16 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id 9913A8E249 for ; Mon, 26 Oct 2015 18:03:15 +0000 (UTC) Date: Mon, 26 Oct 2015 16:03:12 -0200 From: Eduardo Habkost Message-ID: <20151026180312.GD4180@thinpad.lan.raisama.net> References: <1445879623-8403-1-git-send-email-ehabkost@redhat.com> <878u6ppltc.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <878u6ppltc.fsf@blackfin.pond.sub.org> Subject: Re: [Qemu-devel] [PATCH] vl.c: Replace fprintf(stderr) with error_report() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: Paolo Bonzini , Andrew Jones , qemu-devel@nongnu.org On Mon, Oct 26, 2015 at 06:43:43PM +0100, Markus Armbruster wrote: > Eduardo Habkost writes: > > > This replaces most fprintf(stderr) calls on vl.c with error_report(). > > > > The trailing newlines, "qemu:" and "error:" message prefixes were > > removed. > > Good! > > Some of the messages end in a period, which could also be dropped. > Example: > > Usage: -virtfs fsdriver,mount_tag=tag. I will do that as a follow-up, or in case I have to send a new version. > > > The only remaining fprintf(stderr) calls are the ones at > > qemu_kill_report(), because the error mesage is split in multiple > > fprintf() calls. > > I think the straightforward solution would be two error_report() calls: > > @@ -1624,14 +1624,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) { > + error_report("terminating on signal %d", shutdown_signal); > /* This happens for eg ^C at the terminal, so it's worth > * avoiding printing an odd message in that case. > */ > - fputc('\n', stderr); > } else { > - fprintf(stderr, " from pid " FMT_pid "\n", shutdown_pid); > + error_report("terminating on signal %d from pid" FMT_pid, Missing whitespace here. I will fix it and submit a patch. > + shutdown_signal, shutdown_pid); > } > shutdown_signal = -1; > } > > > Signed-off-by: Eduardo Habkost > > --- > > Not sure if this is appropriate post soft-freeze, but if we are going to apply > > the max-cpus patch from Drew before 2.5.0, we could simply change all the > > fprintf() calls in a single step. > > I think it is just fine post soft freeze. It's soft, not hard freeze. > > Neither of my suggestions is important enough to deny my > Reviewed-by: Markus Armbruster Thanks! -- Eduardo