Patchwork [v3,17/18] leon3: Don't enforce use of -bios with qtest

login
register
mail settings
Submitter Andreas Färber
Date Sept. 23, 2013, 1:35 p.m.
Message ID <1379943352-1979-18-git-send-email-afaerber@suse.de>
Download mbox | patch
Permalink /patch/277194/
State New
Headers show

Comments

Andreas Färber - Sept. 23, 2013, 1:35 p.m.
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 hw/sparc/leon3.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Patch

diff --git a/hw/sparc/leon3.c b/hw/sparc/leon3.c
index 390f3e4..c583c3d 100644
--- a/hw/sparc/leon3.c
+++ b/hw/sparc/leon3.c
@@ -26,6 +26,7 @@ 
 #include "hw/ptimer.h"
 #include "sysemu/char.h"
 #include "sysemu/sysemu.h"
+#include "sysemu/qtest.h"
 #include "hw/boards.h"
 #include "hw/loader.h"
 #include "elf.h"
@@ -178,7 +179,7 @@  static void leon3_generic_hw_init(QEMUMachineInitArgs *args)
             fprintf(stderr, "qemu: could not load prom '%s'\n", filename);
             exit(1);
         }
-    } else if (kernel_filename == NULL) {
+    } else if (kernel_filename == NULL && !qtest_enabled()) {
         fprintf(stderr, "Can't read bios image %s\n", filename);
         exit(1);
     }