Patchwork [for-1.6?,v2,13/21] an5206: Don't enforce use of kernel for qtest

login
register
mail settings
Submitter Andreas Färber
Date Aug. 5, 2013, 1:27 p.m.
Message ID <1375709247-10002-14-git-send-email-afaerber@suse.de>
Download mbox | patch
Permalink /patch/264667/
State New
Headers show

Comments

Andreas Färber - Aug. 5, 2013, 1:27 p.m.
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 hw/m68k/an5206.c | 4 ++++
 1 file changed, 4 insertions(+)

Patch

diff --git a/hw/m68k/an5206.c b/hw/m68k/an5206.c
index 0c03a87..abf7d1c 100644
--- a/hw/m68k/an5206.c
+++ b/hw/m68k/an5206.c
@@ -12,6 +12,7 @@ 
 #include "hw/loader.h"
 #include "elf.h"
 #include "exec/address-spaces.h"
+#include "sysemu/qtest.h"
 
 #define KERNEL_LOAD_ADDR 0x10000
 #define AN5206_MBAR_ADDR 0x10000000
@@ -62,6 +63,9 @@  static void an5206_init(QEMUMachineInitArgs *args)
 
     /* Load kernel.  */
     if (!kernel_filename) {
+        if (qtest_enabled()) {
+            return;
+        }
         fprintf(stderr, "Kernel image must be specified\n");
         exit(1);
     }