qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [FOR 0.12 PATCH v2] Check rom_load_all() return value.
@ 2009-12-14 15:07 Gerd Hoffmann
  0 siblings, 0 replies; only message in thread
From: Gerd Hoffmann @ 2009-12-14 15:07 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann

Check rom_load_all() return value.
Also don't make option rom loading failure fatal.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 hw/loader.c |    2 +-
 vl.c        |    5 ++++-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/hw/loader.c b/hw/loader.c
index 2d7a2c4..89491a2 100644
--- a/hw/loader.c
+++ b/hw/loader.c
@@ -669,7 +669,7 @@ int rom_load_all(void)
                         "addr 0x" TARGET_FMT_plx
                         ", size 0x%zx, max 0x" TARGET_FMT_plx ")\n",
                         rom->name, addr, rom->romsize, rom->max);
-                return -1;
+                continue;
             }
         } else {
             /* fixed address requested */
diff --git a/vl.c b/vl.c
index fd70caa..fd93a94 100644
--- a/vl.c
+++ b/vl.c
@@ -6049,7 +6049,10 @@ int main(int argc, char **argv, char **envp)
 
     qdev_machine_creation_done();
 
-    rom_load_all();
+    if (rom_load_all() != 0) {
+        fprintf(stderr, "rom loading failed\n");
+        exit(1);
+    }
 
     qemu_system_reset();
     if (loadvm) {
-- 
1.6.5.2

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2009-12-14 15:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-14 15:07 [Qemu-devel] [FOR 0.12 PATCH v2] Check rom_load_all() return value Gerd Hoffmann

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).