Received: from eggs.gnu.org ([2001:4830:134:3::10]:44995) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b0rJl-0006MC-HQ for qemu-devel@nongnu.org; Thu, 12 May 2016 10:10:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b0rJe-0005no-1v for qemu-devel@nongnu.org; Thu, 12 May 2016 10:10:20 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45653) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b0rJd-0005nQ-TH for qemu-devel@nongnu.org; Thu, 12 May 2016 10:10:14 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (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 911B9627FE for ; Thu, 12 May 2016 14:10:13 +0000 (UTC) From: Eduardo Habkost Date: Thu, 12 May 2016 11:10:00 -0300 Message-Id: <1463062204-20330-3-git-send-email-ehabkost@redhat.com> In-Reply-To: <1463062204-20330-1-git-send-email-ehabkost@redhat.com> References: <1463062204-20330-1-git-send-email-ehabkost@redhat.com> Subject: [Qemu-devel] [PATCH 2/6] vl: Use &error_fatal when parsing monitor options List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, Paolo Bonzini Cc: Markus Armbruster Signed-off-by: Eduardo Habkost --- vl.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/vl.c b/vl.c index bd05609..eea8a04 100644 --- a/vl.c +++ b/vl.c @@ -2402,7 +2402,6 @@ static int mon_init_func(void *opaque, QemuOpts *opts, Error **errp) static void monitor_parse(const char *optarg, const char *mode, bool pretty) { static int monitor_device_index = 0; - Error *local_err = NULL; QemuOpts *opts; const char *p; char label[32]; @@ -2423,11 +2422,7 @@ static void monitor_parse(const char *optarg, const char *mode, bool pretty) } } - opts = qemu_opts_create(qemu_find_opts("mon"), label, 1, &local_err); - if (!opts) { - error_report_err(local_err); - exit(1); - } + opts = qemu_opts_create(qemu_find_opts("mon"), label, 1, &error_fatal); qemu_opt_set(opts, "mode", mode, &error_abort); qemu_opt_set(opts, "chardev", label, &error_abort); qemu_opt_set_bool(opts, "pretty", pretty, &error_abort); -- 2.5.5