Skip to content

Commit

Permalink
shix: Catch CPU initialization errors
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
afaerber authored and aurel32 committed Apr 13, 2013
1 parent 396a14a commit 06f3ed2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions hw/sh4/shix.c
Expand Up @@ -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");
Expand Down

0 comments on commit 06f3ed2

Please sign in to comment.