Patchwork [for-1.6?,v2,02/21] arm/boot: Turn arm_load_kernel() into no-op for qtest without -kernel

login
register
mail settings
Submitter Andreas Färber
Date Aug. 5, 2013, 1:27 p.m.
Message ID <1375709247-10002-3-git-send-email-afaerber@suse.de>
Download mbox | patch
Permalink /patch/264660/
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/arm/boot.c | 4 ++++
 1 file changed, 4 insertions(+)

Patch

diff --git a/hw/arm/boot.c b/hw/arm/boot.c
index 2cbeefd..0c6d611 100644
--- a/hw/arm/boot.c
+++ b/hw/arm/boot.c
@@ -15,6 +15,7 @@ 
 #include "hw/loader.h"
 #include "elf.h"
 #include "sysemu/device_tree.h"
+#include "sysemu/qtest.h"
 #include "qemu/config-file.h"
 
 #define KERNEL_ARGS_ADDR 0x100
@@ -354,6 +355,9 @@  void arm_load_kernel(ARMCPU *cpu, struct arm_boot_info *info)
 
     /* Load the kernel.  */
     if (!info->kernel_filename) {
+        if (qtest_enabled()) {
+            return;
+        }
         fprintf(stderr, "Kernel image must be specified\n");
         exit(1);
     }