Skip to contentSkip to conversation

Check rom_load_all() return value.

PATCH Superseded Gerd Hoffmann 2 participants 2 messages Dec 14, 2009

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Check rom_load_all() return value.

... otherwise we'll continue without the bios loaded in case the option roms don't fit.

---
 vl.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
vl.c +4 -1
index c0d98f5..1682808 100644
@@ -6031,7 +6031,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) {
Signature · 1 line
1.6.5.2
#1 lore raw
Quoted 13 lines · Gerd Hoffmann

... otherwise we'll continue without the bios loaded in case the option roms don't fit.

---
 vl.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
vl.c +0 -0
index c0d98f5..1682808 100644

vl.c int main(int argc, char **argv, char **envp) · line 6038

Quoted 9 lines
vl.c +4 -1
@@ -6031,7 +6031,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);
+    }
 

Failing to load option roms shouldn't be treated as a critical failure. The BIOS has dedicated space so no amount of option roms should prevent the BIOS from loading.

So I think we may need to tweak rom_load_all() a bit to be more intelligent about handling this.

Regards,

Anthony Liguori