qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-ppc] [PATCH v2] ppc/pnv: check for OPAL firmware file presence


From: Thomas Huth
Subject: Re: [Qemu-ppc] [PATCH v2] ppc/pnv: check for OPAL firmware file presence
Date: Mon, 25 Sep 2017 11:01:34 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0

On 25.09.2017 10:58, Cédric Le Goater wrote:
> and exit before uselessly trying to load it if the file does not
> exists.
> 
> Issue discovered by Coverity Scan.
> 
> Signed-off-by: Cédric Le Goater <address@hidden>
> ---
> 
>  Changes since v1:
> 
>  - fixed spelling
>  - improved OPAL naming by adding firmware 
> 
>  hw/ppc/pnv.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c
> index 47221158d415..d46d91c76f5c 100644
> --- a/hw/ppc/pnv.c
> +++ b/hw/ppc/pnv.c
> @@ -570,10 +570,14 @@ static void ppc_powernv_init(MachineState *machine)
>      }
>  
>      fw_filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, bios_name);
> +    if (!fw_filename) {
> +        error_report("Could not find OPAL firmware '%s'", bios_name);
> +        exit(1);
> +    }
>  
>      fw_size = load_image_targphys(fw_filename, FW_LOAD_ADDR, FW_MAX_SIZE);
>      if (fw_size < 0) {
> -        error_report("Could not load OPAL '%s'", fw_filename);
> +        error_report("Could not load OPAL firmware '%s'", fw_filename);
>          exit(1);
>      }
>      g_free(fw_filename);
> 

Reviewed-by: Thomas Huth <address@hidden>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]