Check rom_load_all() return value.
authorGerd Hoffmann <kraxel@redhat.com>
Mon, 14 Dec 2009 15:07:35 +0000 (16:07 +0100)
committerAnthony Liguori <aliguori@us.ibm.com>
Fri, 18 Dec 2009 17:26:27 +0000 (11:26 -0600)
Check rom_load_all() return value.
Also don't make option rom loading failure fatal.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
hw/loader.c
vl.c

index 4c6981fc40c3eeb14e25b24c066dd9b92414d8eb..dd4a9a2b1c733d2b7afa883b2f4a4833ca5804c0 100644 (file)
@@ -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 95abe7e67fe777cfb0e72b2147248b45c488ed4f..8d9d9c239ac1f7daef841ce7ee9c91b2e701300a 100644 (file)
--- 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) {