Patchwork [for-1.6?,v2,01/21] mips_mipssim: Silence BIOS loading warning for qtest

login
register
mail settings
Submitter Andreas Färber
Date Aug. 5, 2013, 1:27 p.m.
Message ID <1375709247-10002-2-git-send-email-afaerber@suse.de>
Download mbox | patch
Permalink /patch/264659/
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/mips/mips_mipssim.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
Aurelien Jarno - Aug. 7, 2013, 10:12 a.m.
On Mon, Aug 05, 2013 at 03:27:07PM +0200, Andreas Färber wrote:
> Signed-off-by: Andreas Färber <afaerber@suse.de>
> ---
>  hw/mips/mips_mipssim.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/hw/mips/mips_mipssim.c b/hw/mips/mips_mipssim.c
> index fea1a15..d8c4347 100644
> --- a/hw/mips/mips_mipssim.c
> +++ b/hw/mips/mips_mipssim.c
> @@ -37,6 +37,7 @@
>  #include "elf.h"
>  #include "hw/sysbus.h"
>  #include "exec/address-spaces.h"
> +#include "sysemu/qtest.h"
>  
>  static struct _loaderparams {
>      int ram_size;
> @@ -189,7 +190,8 @@ mips_mipssim_init(QEMUMachineInitArgs *args)
>      } else {
>          bios_size = -1;
>      }
> -    if ((bios_size < 0 || bios_size > BIOS_SIZE) && !kernel_filename) {
> +    if ((bios_size < 0 || bios_size > BIOS_SIZE) &&
> +        !kernel_filename && !qtest_enabled()) {
>          /* Bail out if we have neither a kernel image nor boot vector code. */
>          fprintf(stderr,
>                  "qemu: Warning, could not load MIPS bios '%s', and no -kernel argument was specified\n",

Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>

Patch

diff --git a/hw/mips/mips_mipssim.c b/hw/mips/mips_mipssim.c
index fea1a15..d8c4347 100644
--- a/hw/mips/mips_mipssim.c
+++ b/hw/mips/mips_mipssim.c
@@ -37,6 +37,7 @@ 
 #include "elf.h"
 #include "hw/sysbus.h"
 #include "exec/address-spaces.h"
+#include "sysemu/qtest.h"
 
 static struct _loaderparams {
     int ram_size;
@@ -189,7 +190,8 @@  mips_mipssim_init(QEMUMachineInitArgs *args)
     } else {
         bios_size = -1;
     }
-    if ((bios_size < 0 || bios_size > BIOS_SIZE) && !kernel_filename) {
+    if ((bios_size < 0 || bios_size > BIOS_SIZE) &&
+        !kernel_filename && !qtest_enabled()) {
         /* Bail out if we have neither a kernel image nor boot vector code. */
         fprintf(stderr,
                 "qemu: Warning, could not load MIPS bios '%s', and no -kernel argument was specified\n",