diff options
-rw-r--r-- | qemu-char.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/qemu-char.c b/qemu-char.c index ee4f4cab2d..bd4e944e1d 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -2506,6 +2506,11 @@ CharDriverState *qemu_chr_open_opts(QemuOpts *opts, return NULL; } + if (qemu_opt_get(opts, "backend") == NULL) { + fprintf(stderr, "chardev: \"%s\" missing backend\n", + qemu_opts_id(opts)); + return NULL; + } for (i = 0; i < ARRAY_SIZE(backend_table); i++) { if (strcmp(backend_table[i].name, qemu_opt_get(opts, "backend")) == 0) break; |