qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2 for-1.6] mips: revert commit b332d24a8e1290954029814d09156b06ede358e2
@ 2013-08-06 11:08 Aurelien Jarno
  2013-08-06 11:35 ` Andreas Färber
  0 siblings, 1 reply; 3+ messages in thread
From: Aurelien Jarno @ 2013-08-06 11:08 UTC (permalink / raw)
  To: qemu-devel; +Cc: Anthony Liguori, Andreas Färber, Aurelien Jarno

Now that this code path is not triggered anymore during the tests,
revert commit b332d24a8e1290954029814d09156b06ede358e2. Booting a MIPS
target without kernel nor bios doesn't really make sense. At the same
time replace fprintf(stderr, ...) by error_report().

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
---
 hw/mips/mips_fulong2e.c |    4 +++-
 hw/mips/mips_jazz.c     |    5 +++--
 hw/mips/mips_malta.c    |    7 ++++---
 hw/mips/mips_mipssim.c  |    7 ++++---
 4 files changed, 14 insertions(+), 9 deletions(-)

v1 -> v2: replace fprintf(stderr, ...) by error_report()

diff --git a/hw/mips/mips_fulong2e.c b/hw/mips/mips_fulong2e.c
index b13750d..b699100 100644
--- a/hw/mips/mips_fulong2e.c
+++ b/hw/mips/mips_fulong2e.c
@@ -44,6 +44,7 @@
 #include "sysemu/blockdev.h"
 #include "exec/address-spaces.h"
 #include "sysemu/qtest.h"
+#include "qemu/error-report.h"
 
 #define DEBUG_FULONG2E_INIT
 
@@ -335,7 +336,8 @@ static void mips_fulong2e_init(QEMUMachineInitArgs *args)
 
         if ((bios_size < 0 || bios_size > BIOS_SIZE) &&
             !kernel_filename && !qtest_enabled()) {
-            fprintf(stderr, "qemu: Warning, could not load MIPS bios '%s'\n", bios_name);
+            error_report("Could not load MIPS bios '%s'\n", bios_name);
+            exit(1);
         }
     }
 
diff --git a/hw/mips/mips_jazz.c b/hw/mips/mips_jazz.c
index 36677cc..d748ded 100644
--- a/hw/mips/mips_jazz.c
+++ b/hw/mips/mips_jazz.c
@@ -43,6 +43,7 @@
 #include "hw/sysbus.h"
 #include "exec/address-spaces.h"
 #include "sysemu/qtest.h"
+#include "qemu/error-report.h"
 
 enum jazz_model_e
 {
@@ -178,8 +179,8 @@ static void mips_jazz_init(MemoryRegion *address_space,
         bios_size = -1;
     }
     if ((bios_size < 0 || bios_size > MAGNUM_BIOS_SIZE) && !qtest_enabled()) {
-        fprintf(stderr, "qemu: Warning, could not load MIPS bios '%s'\n",
-                bios_name);
+        error_report("Could not load MIPS bios '%s'", bios_name);
+        exit(1);
     }
 
     /* Init CPU internal devices */
diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c
index f56f34f..0f5de33 100644
--- a/hw/mips/mips_malta.c
+++ b/hw/mips/mips_malta.c
@@ -49,6 +49,7 @@
 #include "hw/sysbus.h"             /* SysBusDevice */
 #include "qemu/host-utils.h"
 #include "sysemu/qtest.h"
+#include "qemu/error-report.h"
 
 //#define DEBUG_BOARD_INIT
 
@@ -1008,9 +1009,9 @@ void mips_malta_init(QEMUMachineInitArgs *args)
             }
             if ((bios_size < 0 || bios_size > BIOS_SIZE) &&
                 !kernel_filename && !qtest_enabled()) {
-                fprintf(stderr,
-                        "qemu: Warning, could not load MIPS bios '%s', and no -kernel argument was specified\n",
-                        bios_name);
+                error_report("Could not load MIPS bios '%s', and no "
+                             "-kernel argument was specified", bios_name);
+                exit(1);
             }
         }
         /* In little endian mode the 32bit words in the bios are swapped,
diff --git a/hw/mips/mips_mipssim.c b/hw/mips/mips_mipssim.c
index fea1a15..c10d1ad 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 "qemu/error-report.h"
 
 static struct _loaderparams {
     int ram_size;
@@ -191,9 +192,9 @@ mips_mipssim_init(QEMUMachineInitArgs *args)
     }
     if ((bios_size < 0 || bios_size > BIOS_SIZE) && !kernel_filename) {
         /* 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",
-                filename);
+        error_report("Could not load MIPS bios '%s', and no "
+                     "-kernel argument was specified\n", filename);
+        exit(1);
     } else {
         /* We have a boot vector start address. */
         env->active_tc.PC = (target_long)(int32_t)0xbfc00000;
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH v2 for-1.6] mips: revert commit b332d24a8e1290954029814d09156b06ede358e2
  2013-08-06 11:08 [Qemu-devel] [PATCH v2 for-1.6] mips: revert commit b332d24a8e1290954029814d09156b06ede358e2 Aurelien Jarno
@ 2013-08-06 11:35 ` Andreas Färber
  2013-08-08 21:13   ` Aurelien Jarno
  0 siblings, 1 reply; 3+ messages in thread
From: Andreas Färber @ 2013-08-06 11:35 UTC (permalink / raw)
  To: Aurelien Jarno; +Cc: Anthony Liguori, qemu-devel

Am 06.08.2013 13:08, schrieb Aurelien Jarno:
> Now that this code path is not triggered anymore during the tests,
> revert commit b332d24a8e1290954029814d09156b06ede358e2. Booting a MIPS
> target without kernel nor bios doesn't really make sense. At the same
> time replace fprintf(stderr, ...) by error_report().
> 
> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
> ---
>  hw/mips/mips_fulong2e.c |    4 +++-
>  hw/mips/mips_jazz.c     |    5 +++--
>  hw/mips/mips_malta.c    |    7 ++++---
>  hw/mips/mips_mipssim.c  |    7 ++++---
>  4 files changed, 14 insertions(+), 9 deletions(-)
> 
> v1 -> v2: replace fprintf(stderr, ...) by error_report()

If you drop the two remaining \n then feel free to commit with my
Reviewed-by.

Thanks,
Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH v2 for-1.6] mips: revert commit b332d24a8e1290954029814d09156b06ede358e2
  2013-08-06 11:35 ` Andreas Färber
@ 2013-08-08 21:13   ` Aurelien Jarno
  0 siblings, 0 replies; 3+ messages in thread
From: Aurelien Jarno @ 2013-08-08 21:13 UTC (permalink / raw)
  To: Andreas Färber; +Cc: Anthony Liguori, qemu-devel

On Tue, Aug 06, 2013 at 01:35:12PM +0200, Andreas Färber wrote:
> Am 06.08.2013 13:08, schrieb Aurelien Jarno:
> > Now that this code path is not triggered anymore during the tests,
> > revert commit b332d24a8e1290954029814d09156b06ede358e2. Booting a MIPS
> > target without kernel nor bios doesn't really make sense. At the same
> > time replace fprintf(stderr, ...) by error_report().
> > 
> > Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
> > ---
> >  hw/mips/mips_fulong2e.c |    4 +++-
> >  hw/mips/mips_jazz.c     |    5 +++--
> >  hw/mips/mips_malta.c    |    7 ++++---
> >  hw/mips/mips_mipssim.c  |    7 ++++---
> >  4 files changed, 14 insertions(+), 9 deletions(-)
> > 
> > v1 -> v2: replace fprintf(stderr, ...) by error_report()
> 
> If you drop the two remaining \n then feel free to commit with my
> Reviewed-by.
> 

Thanks for the review, I have just applied it with the mentioned
changes.


-- 
Aurelien Jarno                          GPG: 1024D/F1BCDB73
aurelien@aurel32.net                 http://www.aurel32.net

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-08-08 21:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-06 11:08 [Qemu-devel] [PATCH v2 for-1.6] mips: revert commit b332d24a8e1290954029814d09156b06ede358e2 Aurelien Jarno
2013-08-06 11:35 ` Andreas Färber
2013-08-08 21:13   ` Aurelien Jarno

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).