From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40182) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZqloG-00068o-4T for qemu-devel@nongnu.org; Mon, 26 Oct 2015 13:43:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZqloC-0003Jo-7I for qemu-devel@nongnu.org; Mon, 26 Oct 2015 13:43:51 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60017) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZqloC-0003Jc-1Q for qemu-devel@nongnu.org; Mon, 26 Oct 2015 13:43:48 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id D92D08E231 for ; Mon, 26 Oct 2015 17:43:45 +0000 (UTC) From: Markus Armbruster References: <1445879623-8403-1-git-send-email-ehabkost@redhat.com> Date: Mon, 26 Oct 2015 18:43:43 +0100 In-Reply-To: <1445879623-8403-1-git-send-email-ehabkost@redhat.com> (Eduardo Habkost's message of "Mon, 26 Oct 2015 15:13:43 -0200") Message-ID: <878u6ppltc.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain 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: Eduardo Habkost Cc: Paolo Bonzini , Andrew Jones , qemu-devel@nongnu.org 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. > 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, + 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