qtest: Don't segfault with invalid -qtest option
commit23802b4fe0cf5821b72aa5bc682e38c8c91bb168
authorFam Zheng <famz@redhat.com>
Mon, 10 Feb 2014 01:28:02 +0000 (10 09:28 +0800)
committerAndreas Färber <afaerber@suse.de>
Fri, 14 Feb 2014 20:12:01 +0000 (14 21:12 +0100)
treea3baf7fff29cfac745b81dc49ccb1bfa5055b300
parent1f9c4cfda4df7c442255f9492a2408d80df1d42a
qtest: Don't segfault with invalid -qtest option

This prints an error message, instead of core dump, when "-qtest"
option value is invalid, e.g.:

    $ ./x86_64-softmmu/qemu-system-x86_64 -qtest unknown
        qemu-system-x86_64: Failed to initialize device for qtest:
        "unknown"

Signed-off-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
include/sysemu/qtest.h
qtest.c
vl.c