aboutsummaryrefslogtreecommitdiff
path: root/hw/sh4
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2013-04-09 16:51:23 +0200
committerAurelien Jarno <aurelien@aurel32.net>2013-04-13 13:51:44 +0200
commit06f3ed26983a04df74729d748a7b05400d8f3386 (patch)
tree15c7e81daab87b887ec02d75c3c1865d653bb8ae /hw/sh4
parent396a14a3be17edbcdf33ad2c94d6e1069464f9e0 (diff)
shix: Catch CPU initialization errors
Print an error message as done for the r2d machine and exit. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'hw/sh4')
-rw-r--r--hw/sh4/shix.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/hw/sh4/shix.c b/hw/sh4/shix.c
index c23d4afb10..f5cfef9e3b 100644
--- a/hw/sh4/shix.c
+++ b/hw/sh4/shix.c
@@ -52,6 +52,10 @@ static void shix_init(QEMUMachineInitArgs *args)
printf("Initializing CPU\n");
env = cpu_init(cpu_model);
+ if (env == NULL) {
+ fprintf(stderr, "Unable to find CPU definition\n");
+ exit(1);
+ }
/* Allocate memory space */
printf("Allocating ROM\n");