diff mbox

[for-1.6?,v2,14/21] milkymist: Suppress -kernel/-bios/-drive error for qtest

Message ID 1375709247-10002-15-git-send-email-afaerber@suse.de
State New
Headers show

Commit Message

Andreas Färber Aug. 5, 2013, 1:27 p.m. UTC
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 hw/lm32/milkymist.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Michael Walle Aug. 7, 2013, 5:34 a.m. UTC | #1
Am 2013-08-05 15:27, schrieb Andreas Färber:
> Signed-off-by: Andreas Färber <afaerber@suse.de>

Acked-by: Michael Walle <michael@walle.cc>

> ---
>  hw/lm32/milkymist.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/hw/lm32/milkymist.c b/hw/lm32/milkymist.c
> index 7ceedb8..a8e7230 100644
> --- a/hw/lm32/milkymist.c
> +++ b/hw/lm32/milkymist.c
> @@ -21,6 +21,7 @@
>  #include "hw/hw.h"
>  #include "hw/block/flash.h"
>  #include "sysemu/sysemu.h"
> +#include "sysemu/qtest.h"
>  #include "hw/devices.h"
>  #include "hw/boards.h"
>  #include "hw/loader.h"
> @@ -143,7 +144,7 @@ milkymist_init(QEMUMachineInitArgs *args)
>      reset_info->bootstrap_pc = BIOS_OFFSET;
>
>      /* if no kernel is given no valid bios rom is a fatal error */
> -    if (!kernel_filename && !dinfo && !bios_filename) {
> +    if (!kernel_filename && !dinfo && !bios_filename && 
> !qtest_enabled()) {
>          fprintf(stderr, "qemu: could not load Milkymist One bios 
> '%s'\n",
>                  bios_name);
>          exit(1);
diff mbox

Patch

diff --git a/hw/lm32/milkymist.c b/hw/lm32/milkymist.c
index 7ceedb8..a8e7230 100644
--- a/hw/lm32/milkymist.c
+++ b/hw/lm32/milkymist.c
@@ -21,6 +21,7 @@ 
 #include "hw/hw.h"
 #include "hw/block/flash.h"
 #include "sysemu/sysemu.h"
+#include "sysemu/qtest.h"
 #include "hw/devices.h"
 #include "hw/boards.h"
 #include "hw/loader.h"
@@ -143,7 +144,7 @@  milkymist_init(QEMUMachineInitArgs *args)
     reset_info->bootstrap_pc = BIOS_OFFSET;
 
     /* if no kernel is given no valid bios rom is a fatal error */
-    if (!kernel_filename && !dinfo && !bios_filename) {
+    if (!kernel_filename && !dinfo && !bios_filename && !qtest_enabled()) {
         fprintf(stderr, "qemu: could not load Milkymist One bios '%s'\n",
                 bios_name);
         exit(1);