diff mbox

spapr: Respect -bios command line option for SLOF

Message ID 1372879610-23949-1-git-send-email-afaerber@suse.de
State New
Headers show

Commit Message

Andreas Färber July 3, 2013, 7:26 p.m. UTC
Allow the user to override the firmware file name rather than always
using "slof.bin".

Reported-by: Dinar Valeev <k0da@opensuse.org>
Cc: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 hw/ppc/spapr.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Alexander Graf July 3, 2013, 7:30 p.m. UTC | #1
On 03.07.2013, at 21:26, Andreas Färber wrote:

> Allow the user to override the firmware file name rather than always
> using "slof.bin".
> 
> Reported-by: Dinar Valeev <k0da@opensuse.org>
> Cc: Alexey Kardashevskiy <aik@ozlabs.ru>
> Signed-off-by: Andreas Färber <afaerber@suse.de>

Thanks, applied to ppc-next.


Alex

> ---
> hw/ppc/spapr.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
> index fe34291..bebf55c 100644
> --- a/hw/ppc/spapr.c
> +++ b/hw/ppc/spapr.c
> @@ -949,7 +949,10 @@ static void ppc_spapr_init(QEMUMachineInitArgs *args)
>         }
>     }
> 
> -    filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, FW_FILE_NAME);
> +    if (bios_name == NULL) {
> +        bios_name = FW_FILE_NAME;
> +    }
> +    filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, bios_name);
>     fw_size = load_image_targphys(filename, 0, FW_MAX_SIZE);
>     if (fw_size < 0) {
>         hw_error("qemu: could not load LPAR rtas '%s'\n", filename);
> -- 
> 1.8.1.4
>
diff mbox

Patch

diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index fe34291..bebf55c 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -949,7 +949,10 @@  static void ppc_spapr_init(QEMUMachineInitArgs *args)
         }
     }
 
-    filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, FW_FILE_NAME);
+    if (bios_name == NULL) {
+        bios_name = FW_FILE_NAME;
+    }
+    filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, bios_name);
     fw_size = load_image_targphys(filename, 0, FW_MAX_SIZE);
     if (fw_size < 0) {
         hw_error("qemu: could not load LPAR rtas '%s'\n", filename);