diff options
Diffstat (limited to 'vl.c')
-rw-r--r-- | vl.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -2344,10 +2344,12 @@ static int chardev_init_func(void *opaque, QemuOpts *opts, Error **errp) { Error *local_err = NULL; - qemu_chr_new_from_opts(opts, &local_err); - if (local_err) { - error_report_err(local_err); - return -1; + if (!qemu_chr_new_from_opts(opts, &local_err)) { + if (local_err) { + error_report_err(local_err); + return -1; + } + exit(0); } return 0; } |