]> Git Repo - qemu.git/commitdiff
target-arm: Catch attempt to instantiate abstract type in cpu_init()
authorAndreas Färber <[email protected]>
Wed, 23 Jan 2013 11:32:49 +0000 (12:32 +0100)
committerAndreas Färber <[email protected]>
Sun, 27 Jan 2013 22:33:34 +0000 (23:33 +0100)
This fixes -cpu arm-cpu asserting.

Cc: [email protected]
Acked-by: Peter Maydell <[email protected]>
Signed-off-by: Andreas Färber <[email protected]>
target-arm/cpu.c

index 57126b6855896383ab060694694a1457d71fc8b8..d1a4c826801cdbdbea88c59e04b18950595a6263 100644 (file)
@@ -210,7 +210,8 @@ static ObjectClass *arm_cpu_class_by_name(const char *cpu_model)
     }
 
     oc = object_class_by_name(cpu_model);
-    if (!oc || !object_class_dynamic_cast(oc, TYPE_ARM_CPU)) {
+    if (!oc || !object_class_dynamic_cast(oc, TYPE_ARM_CPU) ||
+        object_class_is_abstract(oc)) {
         return NULL;
     }
     return oc;
This page took 0.026462 seconds and 4 git commands to generate.