Patchwork [for-1.6?,v2,12/21] mcf5208: 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-13-git-send-email-afaerber@suse.de>
Download mbox | patch
Permalink /patch/264676/
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/mcf5208.c | 4 ++++
 1 file changed, 4 insertions(+)

Patch

diff --git a/hw/m68k/mcf5208.c b/hw/m68k/mcf5208.c
index 9cf000f..14fecc4 100644
--- a/hw/m68k/mcf5208.c
+++ b/hw/m68k/mcf5208.c
@@ -10,6 +10,7 @@ 
 #include "qemu/timer.h"
 #include "hw/ptimer.h"
 #include "sysemu/sysemu.h"
+#include "sysemu/qtest.h"
 #include "net/net.h"
 #include "hw/boards.h"
 #include "hw/loader.h"
@@ -267,6 +268,9 @@  static void mcf5208evb_init(QEMUMachineInitArgs *args)
 
     /* Load kernel.  */
     if (!kernel_filename) {
+        if (qtest_enabled()) {
+            return;
+        }
         fprintf(stderr, "Kernel image must be specified\n");
         exit(1);
     }