diff mbox

[2/2] rom loader: also try filename as-is.

Message ID 1254915427-7375-2-git-send-email-kraxel@redhat.com
State Under Review
Headers show

Commit Message

Gerd Hoffmann Oct. 7, 2009, 11:37 a.m. UTC
In case qemu_find_file fails try to open the file as-is.

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

Patch

diff --git a/hw/loader.c b/hw/loader.c
index 40112b9..4ce7c6a 100644
--- a/hw/loader.c
+++ b/hw/loader.c
@@ -559,8 +559,7 @@  int rom_add_file(const char *file,
     rom->name = qemu_strdup(file);
     rom->path = qemu_find_file(QEMU_FILE_TYPE_BIOS, rom->name);
     if (rom->path == NULL) {
-        fprintf(stderr, "Could not find option rom '%s'\n", rom->name);
-        goto err;
+        rom->path = strdup(file);
     }
 
     fd = open(rom->path, O_RDONLY);