Received: from eggs.gnu.org ([2001:4830:134:3::10]:48871) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zrqzb-0004mo-PE for qemu-devel@nongnu.org; Thu, 29 Oct 2015 13:28:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZrqzY-0007g7-Eh for qemu-devel@nongnu.org; Thu, 29 Oct 2015 13:28:03 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40433) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZrqzY-0007fx-91 for qemu-devel@nongnu.org; Thu, 29 Oct 2015 13:28:00 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id 057B28E37C for ; Thu, 29 Oct 2015 17:27:59 +0000 (UTC) From: Markus Armbruster References: <1446057425-16891-1-git-send-email-ehabkost@redhat.com> <1446057425-16891-14-git-send-email-ehabkost@redhat.com> Date: Thu, 29 Oct 2015 18:27:57 +0100 In-Reply-To: <1446057425-16891-14-git-send-email-ehabkost@redhat.com> (Eduardo Habkost's message of "Wed, 28 Oct 2015 16:37:02 -0200") Message-ID: <87oafhvb36.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH v2 13/16] vl.c: Reword -machine help error messages 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: > * Use "\n" consistently in both error messages. > * Simplify error message. > > Signed-off-by: Eduardo Habkost > --- > vl.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/vl.c b/vl.c > index 61e474b..55521a0 100644 > --- a/vl.c > +++ b/vl.c > @@ -2634,8 +2634,8 @@ static gint machine_class_cmp(gconstpointer a, gconstpointer b) > return mc; > } > if (name && !is_help_option(name)) { > - error_report("unsupported machine type"); > - error_printf("Use -machine help to list supported machines!\n"); > + error_report("unsupported machine type\n" > + "Use -machine help to list supported machines"); error_report()'s contract: /* * Print an error message to current monitor if we have one, else to stderr. * Format arguments like sprintf(). The result should not contain * newlines. * Prepend the current location and append a newline. * It's wrong to call this in a QMP monitor. Use error_setg() there. */ The old code gets it right. You could squash the removal of '!' into PATCH 03. > } else { > printf("Supported machines are:\n"); > machines = g_slist_sort(machines, machine_class_cmp); > @@ -3994,8 +3994,8 @@ int main(int argc, char **argv, char **envp) > } > > if (machine_class == NULL) { > - error_report("No machine specified, and there is no default.\n" > - "Use -machine help to list supported machines!"); > + error_report("no machine specified\n" > + "Use -machine help to list supported machines"); > exit(1); > } Likewise.