exit qemu when unknown object type is specified by -object
PATCH 1/1 exit qemu when unknown object type is specified by -object
...to avoid assertion failure in object_new_with_type(). Can be reproduced by: qemu -object unknown-object,id=xxx
Signed-off-by Hu Tao <[email protected]>
--- qom/object.c | 5 +++++ 1 file changed, 5 insertions(+)
qom/object.c +5 -0
@@ -448,6 +448,11 @@ Object *object_new(const char *typename) {TypeImpl *ti =type_get_by_name (typename); +if (!ti) { +error_report ("unknown object type: %s\n" , typename); +exit (1 ); + } +return object_new_with_type (ti); }
Signature · 1 line
1.8.5.2.229.g4448466