summary refs log tree commit diff stats
path: root/hw/sh4/shix.c
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2013-08-04 17:51:15 +0200
committerAndreas Färber <afaerber@suse.de>2013-11-05 17:47:29 +0100
commitd32f7d2506f1dab996e977e478f19baff5d47b51 (patch)
treed56eab2e17252b0ec79a6684612478d3d649104d /hw/sh4/shix.c
parentb6e770ee505771a6f3c3ffbf05719c149e069e3d (diff)
downloadfocaccia-qemu-d32f7d2506f1dab996e977e478f19baff5d47b51.tar.gz
focaccia-qemu-d32f7d2506f1dab996e977e478f19baff5d47b51.zip
shix: Don't require firmware presence for qtest
Adopt error_report() while at it.

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'hw/sh4/shix.c')
-rw-r--r--hw/sh4/shix.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/hw/sh4/shix.c b/hw/sh4/shix.c
index f008b9891b..904a966700 100644
--- a/hw/sh4/shix.c
+++ b/hw/sh4/shix.c
@@ -30,9 +30,11 @@
 #include "hw/hw.h"
 #include "hw/sh4/sh.h"
 #include "sysemu/sysemu.h"
+#include "sysemu/qtest.h"
 #include "hw/boards.h"
 #include "hw/loader.h"
 #include "exec/address-spaces.h"
+#include "qemu/error-report.h"
 
 #define BIOS_FILENAME "shix_bios.bin"
 #define BIOS_ADDRESS 0xA0000000
@@ -72,10 +74,9 @@ static void shix_init(QEMUMachineInitArgs *args)
     if (bios_name == NULL)
         bios_name = BIOS_FILENAME;
     ret = load_image_targphys(bios_name, 0, 0x4000);
-    if (ret < 0) {		/* Check bios size */
-	fprintf(stderr, "qemu: could not load SHIX bios '%s'\n",
-		bios_name);
-	exit(1);
+    if (ret < 0 && !qtest_enabled()) {
+        error_report("Could not load SHIX bios '%s'", bios_name);
+        exit(1);
     }
 
     /* Register peripherals */