[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH qom-cpu 1/2] shix: Catch CPU initialization errors
From: |
Andreas Färber |
Subject: |
[Qemu-devel] [PATCH qom-cpu 1/2] shix: Catch CPU initialization errors |
Date: |
Tue, 9 Apr 2013 16:51:23 +0200 |
Print an error message as done for the r2d machine and exit.
Signed-off-by: Andreas Färber <address@hidden>
---
hw/sh4/shix.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/hw/sh4/shix.c b/hw/sh4/shix.c
index c23d4af..f5cfef9 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");
--
1.8.1.4