qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>
Subject: [Qemu-devel] [FOR 0.12 PATCH v2] Check rom_load_all() return value.
Date: Mon, 14 Dec 2009 16:07:35 +0100	[thread overview]
Message-ID: <1260803255-23943-1-git-send-email-kraxel@redhat.com> (raw)

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

                 reply	other threads:[~2009-12-14 15:08 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1260803255-23943-1-git-send-email-kraxel@redhat.com \
    --to=kraxel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).