Received: from eggs.gnu.org ([2001:4830:134:3::10]:60951) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aqVWR-0002DL-Pb for qemu-devel@nongnu.org; Wed, 13 Apr 2016 20:52:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aqVWQ-0006eF-Sg for qemu-devel@nongnu.org; Wed, 13 Apr 2016 20:52:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56473) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aqVWQ-0006eB-NV for qemu-devel@nongnu.org; Wed, 13 Apr 2016 20:52:38 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 54FFAC04B303 for ; Thu, 14 Apr 2016 00:52:38 +0000 (UTC) From: Eduardo Habkost Date: Wed, 13 Apr 2016 21:51:56 -0300 Message-Id: <1460595118-23127-2-git-send-email-ehabkost@redhat.com> In-Reply-To: <1460595118-23127-1-git-send-email-ehabkost@redhat.com> References: <1460595118-23127-1-git-send-email-ehabkost@redhat.com> Subject: [Qemu-devel] [PATCH for-2.7 v2 1/3] vl: Use exit(1) when requested VGA interface is unavailable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Paolo Bonzini , "Michael S. Tsirkin" , Marcel Apfelbaum Instead of using exit(0), use exit(1) when an unavailable VGA interface is used in the command-line to indicate it's an error. Reviewed-by: Eric Blake Signed-off-by: Eduardo Habkost --- vl.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/vl.c b/vl.c index 9df534f..3c565bb 100644 --- a/vl.c +++ b/vl.c @@ -2025,28 +2025,28 @@ static void select_vgahw (const char *p) vga_interface_type = VGA_STD; } else { error_report("standard VGA not available"); - exit(0); + exit(1); } } else if (strstart(p, "cirrus", &opts)) { if (cirrus_vga_available()) { vga_interface_type = VGA_CIRRUS; } else { error_report("Cirrus VGA not available"); - exit(0); + exit(1); } } else if (strstart(p, "vmware", &opts)) { if (vmware_vga_available()) { vga_interface_type = VGA_VMWARE; } else { error_report("VMWare SVGA not available"); - exit(0); + exit(1); } } else if (strstart(p, "virtio", &opts)) { if (virtio_vga_available()) { vga_interface_type = VGA_VIRTIO; } else { error_report("Virtio VGA not available"); - exit(0); + exit(1); } } else if (strstart(p, "xenfb", &opts)) { vga_interface_type = VGA_XENFB; @@ -2055,21 +2055,21 @@ static void select_vgahw (const char *p) vga_interface_type = VGA_QXL; } else { error_report("QXL VGA not available"); - exit(0); + exit(1); } } else if (strstart(p, "tcx", &opts)) { if (tcx_vga_available()) { vga_interface_type = VGA_TCX; } else { error_report("TCX framebuffer not available"); - exit(0); + exit(1); } } else if (strstart(p, "cg3", &opts)) { if (cg3_vga_available()) { vga_interface_type = VGA_CG3; } else { error_report("CG3 framebuffer not available"); - exit(0); + exit(1); } } else if (!strstart(p, "none", &opts)) { invalid_vga: -- 2.1.0