From patchwork Mon Oct 26 14:06:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Jones X-Patchwork-Id: 536050 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 71D1A1412FD for ; Tue, 27 Oct 2015 01:06:47 +1100 (AEDT) Received: from localhost ([::1]:53143 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZqiQ9-00083r-Lh for incoming@patchwork.ozlabs.org; Mon, 26 Oct 2015 10:06:45 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38722) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZqiPm-0007mq-Hn for qemu-devel@nongnu.org; Mon, 26 Oct 2015 10:06:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZqiPh-0005fE-RL for qemu-devel@nongnu.org; Mon, 26 Oct 2015 10:06:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:32861) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZqiPh-0005f7-MV for qemu-devel@nongnu.org; Mon, 26 Oct 2015 10:06:17 -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 2C94FA58BB for ; Mon, 26 Oct 2015 14:06:17 +0000 (UTC) Received: from hawk.localdomain.com (dhcp-1-144.brq.redhat.com [10.34.1.144]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t9QE6Fxu017300; Mon, 26 Oct 2015 10:06:16 -0400 From: Andrew Jones To: qemu-devel@nongnu.org Date: Mon, 26 Oct 2015 15:06:13 +0100 Message-Id: <1445868373-8113-1-git-send-email-drjones@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: ehabkost@redhat.com Subject: [Qemu-devel] [PATCH] vl: trivial: use error_report for max-cpu error X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Andrew Jones Reviewed-by: Eric Blake --- There are plenty of fprintf's left in vl.c, but here's another baby step... vl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vl.c b/vl.c index 9a64b75ebbd24..549c6675fe8df 100644 --- a/vl.c +++ b/vl.c @@ -4080,9 +4080,9 @@ int main(int argc, char **argv, char **envp) machine_class->max_cpus = machine_class->max_cpus ?: 1; /* Default to UP */ if (max_cpus > machine_class->max_cpus) { - fprintf(stderr, "Number of SMP CPUs requested (%d) exceeds max CPUs " - "supported by machine '%s' (%d)\n", max_cpus, - machine_class->name, machine_class->max_cpus); + error_report("Number of SMP CPUs requested (%d) exceeds max CPUs " + "supported by machine '%s' (%d)", max_cpus, + machine_class->name, machine_class->max_cpus); exit(1); }