projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5913815
)
hw/arm/highbank: Don't segfault on unknown CPU names
author
Peter Maydell
<peter.maydell@linaro.org>
Fri, 4 Apr 2014 16:42:33 +0000
(17:42 +0100)
committer
Peter Maydell
<peter.maydell@linaro.org>
Fri, 4 Apr 2014 16:46:11 +0000
(17:46 +0100)
If the user passes an unknown CPU name via the '-cpu' option, exit
with an error message rather than segfaulting.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Rob Herring <rob.herring@linaro.org>
hw/arm/highbank.c
patch
|
blob
|
history
diff --git
a/hw/arm/highbank.c
b/hw/arm/highbank.c
index f66d57b113396890d2afd66819be87029d1eb2d5..2a88b843e9624fa51027c1dbec8c6d933cb6284a 100644
(file)
--- a/
hw/arm/highbank.c
+++ b/
hw/arm/highbank.c
@@
-233,6
+233,11
@@
static void calxeda_init(QEMUMachineInitArgs *args, enum cxmachines machine)
ARMCPU *cpu;
Error *err = NULL;
+ if (!oc) {
+ error_report("Unable to find CPU definition");
+ exit(1);
+ }
+
cpu = ARM_CPU(object_new(object_class_get_name(oc)));
object_property_set_int(OBJECT(cpu), MPCORE_PERIPHBASE, "reset-cbar",