qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 1/2] niagara: fail if a firmware file is missing


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH 1/2] niagara: fail if a firmware file is missing
Date: Mon, 23 Jan 2017 22:18:50 +0000

On 23 January 2017 at 22:17, Peter Maydell <address@hidden> wrote:
> On 23 January 2017 at 21:21, Artyom Tarasenko <address@hidden> wrote:
>> Suggested-by: Peter Maydell <address@hidden>
>> Signed-off-by: Artyom Tarasenko <address@hidden>
>> ---
>>  hw/sparc64/niagara.c | 22 +++++++++++++++-------
>>  1 file changed, 15 insertions(+), 7 deletions(-)
>>
>> diff --git a/hw/sparc64/niagara.c b/hw/sparc64/niagara.c
>> index b55d4bb..e945b5a 100644
>> --- a/hw/sparc64/niagara.c
>> +++ b/hw/sparc64/niagara.c
>> @@ -35,6 +35,7 @@
>>  #include "hw/timer/sun4v-rtc.h"
>>  #include "exec/address-spaces.h"
>>  #include "sysemu/block-backend.h"
>> +#include "qemu/error-report.h"
>>
>>
>>  typedef struct NiagaraBoardState {
>> @@ -85,6 +86,14 @@ typedef struct NiagaraBoardState {
>>  #define NIAGARA_OBP_OFFSET  0x80000ULL
>>  #define PROM_SIZE_MAX       (4 * 1024 * 1024)
>>
>> +static void add_rom_or_fail(const char *file, const hwaddr addr)
>> +{
>> +    if (rom_add_file_fixed(file, addr, -1)) {
>> +        error_report("Unable to load a firmware for -M niagara");
>> +        exit(1);
>
> It would be nice to include the name of the file in the
> error message -- or is that reported already inside
> rom_add_file_fixed() somehow?

PS: doesn't this break 'make check' if the rom files
are missing?

thanks
-- PMM



reply via email to

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