]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
shix: Catch CPU initialization errors
authorAndreas Färber <afaerber@suse.de>
Tue, 9 Apr 2013 14:51:23 +0000 (16:51 +0200)
committerAurelien Jarno <aurelien@aurel32.net>
Sat, 13 Apr 2013 11:51:44 +0000 (13:51 +0200)
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>
hw/sh4/shix.c

index c23d4afb10f17e825ef6c5935e666c221d55ab28..f5cfef9e3bb6eabfd3e8993b17203fe77d126a87 100644 (file)
@@ -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");