aboutsummaryrefslogtreecommitdiff
path: root/chardev/char.c
diff options
context:
space:
mode:
authorAnton Nefedov <anton.nefedov@virtuozzo.com>2017-07-25 13:04:41 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2017-08-01 17:27:33 +0200
commit0ec846bface0f9733ca61ba18e3d4b72bfd9f8ca (patch)
treeba0be0c50679eccff36b1668ec7c8d001ba7e1c6 /chardev/char.c
parent4db0db1fa6b653970148f6ff7a24bede1d52ef9d (diff)
char: don't exit on hmp 'chardev-add help'
qemu_chr_new_from_opts() is used from both vl.c and hmp, and it is quite confusing to see qemu suddenly exit after receiving a help option in hmp. Do exit(0) from vl.c instead. Signed-off-by: Anton Nefedov <anton.nefedov@virtuozzo.com> Message-Id: <1500977081-120929-1-git-send-email-anton.nefedov@virtuozzo.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'chardev/char.c')
-rw-r--r--chardev/char.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/chardev/char.c b/chardev/char.c
index c34b44abc9..5d283b90d3 100644
--- a/chardev/char.c
+++ b/chardev/char.c
@@ -620,7 +620,7 @@ Chardev *qemu_chr_new_from_opts(QemuOpts *opts, Error **errp)
error_report("Available chardev backend types: %s", str->str);
g_string_free(str, true);
- exit(0);
+ return NULL;
}
if (id == NULL) {