diff options
Diffstat (limited to 'vl.c')
-rw-r--r-- | vl.c | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -2239,7 +2239,7 @@ static int chardev_init_func(void *opaque, QemuOpts *opts, Error **errp) if (!qemu_chr_new_from_opts(opts, &local_err)) { if (local_err) { - error_report_err(local_err); + error_propagate(errp, local_err); return -1; } exit(0); @@ -4233,10 +4233,8 @@ int main(int argc, char **argv, char **envp) user_creatable_add_opts_foreach, object_create_initial, &error_fatal); - if (qemu_opts_foreach(qemu_find_opts("chardev"), - chardev_init_func, NULL, NULL)) { - exit(1); - } + qemu_opts_foreach(qemu_find_opts("chardev"), + chardev_init_func, NULL, &error_fatal); #ifdef CONFIG_VIRTFS if (qemu_opts_foreach(qemu_find_opts("fsdev"), |