qemu-ppc
[Top][All Lists]
Advanced

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

Re: [Qemu-ppc] [Qemu-devel] [PATCH v2 32/47] hw/ppc: Replace fprintf(std


From: Thomas Huth
Subject: Re: [Qemu-ppc] [Qemu-devel] [PATCH v2 32/47] hw/ppc: Replace fprintf(stderr, "*\n" with error_report()
Date: Mon, 16 Oct 2017 13:53:24 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0

On 30.09.2017 02:16, Alistair Francis wrote:
> Replace a large number of the fprintf(stderr, "*\n" calls with
> error_report(). The functions were renamed with these commands and then
> compiler issues where manually fixed.
[...]
> diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c
> index db0e49ab8f..8a5350161f 100644
> --- a/hw/ppc/e500.c
> +++ b/hw/ppc/e500.c
[...]
> @@ -967,7 +967,7 @@ void ppce500_init(MachineState *machine, PPCE500Params 
> *params)
>                                            cur_base,
>                                            ram_size - cur_base);
>          if (kernel_size < 0) {
> -            fprintf(stderr, "qemu: could not load kernel '%s'\n",
> +            error_report("qemu: could not load kernel '%s'",
>                      machine->kernel_filename);
>              exit(1);
>          }
> @@ -982,8 +982,8 @@ void ppce500_init(MachineState *machine, PPCE500Params 
> *params)
>                                            ram_size - initrd_base);
>  
>          if (initrd_size < 0) {
> -            fprintf(stderr, "qemu: could not load initial ram disk '%s'\n",
> -                    machine->initrd_filename);
> +            error_report("qemu: could not load initial ram disk '%s'",
> +                         machine->initrd_filename);
>              exit(1);
>          }
>  
> @@ -1024,7 +1024,7 @@ void ppce500_init(MachineState *machine, PPCE500Params 
> *params)
>          kernel_size = load_uimage(filename, &bios_entry, &loadaddr, NULL,
>                                    NULL, NULL);
>          if (kernel_size < 0) {
> -            fprintf(stderr, "qemu: could not load firmware '%s'\n", 
> filename);
> +            error_report("qemu: could not load firmware '%s'", filename);
>              exit(1);
>          }
>      }

Please remove the "qemu:" prefix from the strings here, too.

 Thomas



reply via email to

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