summaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
authorEduardo Habkost <ehabkost@redhat.com>2016-05-12 11:10:00 -0300
committerEduardo Habkost <ehabkost@redhat.com>2016-05-20 14:28:55 -0300
commit822ac12df0387b2d2eb1ff8fc6cddb46aa0c3867 (patch)
tree68140ca01cf732e988cd43ae183c6a0055c9f460 /vl.c
parent7b1ee0f2b732029c7826125f6b6eb6e1e2d4fd22 (diff)
downloadqemu-822ac12df0387b2d2eb1ff8fc6cddb46aa0c3867.tar.gz
qemu-822ac12df0387b2d2eb1ff8fc6cddb46aa0c3867.tar.bz2
qemu-822ac12df0387b2d2eb1ff8fc6cddb46aa0c3867.zip
vl: Use &error_fatal when parsing monitor options
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/vl.c b/vl.c
index bc229030f6..b1562d8280 100644
--- a/vl.c
+++ b/vl.c
@@ -2404,7 +2404,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];
@@ -2425,11 +2424,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);