rom loader: also try filename as-is.

In case qemu_find_file fails try to open the file as-is.

Patchworks-ID: 35263
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
Gerd Hoffmann 2009-10-07 13:37:07 +02:00 committed by Anthony Liguori
parent 3c178e72e0
commit b96bf49306

View File

@ -559,8 +559,7 @@ int rom_add_file(const char *file,
rom->name = qemu_strdup(file); rom->name = qemu_strdup(file);
rom->path = qemu_find_file(QEMU_FILE_TYPE_BIOS, rom->name); rom->path = qemu_find_file(QEMU_FILE_TYPE_BIOS, rom->name);
if (rom->path == NULL) { if (rom->path == NULL) {
fprintf(stderr, "Could not find option rom '%s'\n", rom->name); rom->path = strdup(file);
goto err;
} }
fd = open(rom->path, O_RDONLY | O_BINARY); fd = open(rom->path, O_RDONLY | O_BINARY);