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