[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [Qemu-devel] [PATCH v4 31/45] hw/ppc: Replace fprintf(std
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [Qemu-ppc] [Qemu-devel] [PATCH v4 31/45] hw/ppc: Replace fprintf(stderr, "*\n" with error_report() |
Date: |
Wed, 8 Nov 2017 23:29:33 -0300 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 |
Cc'ing Alexander to ask him about the mpc8544ds.
On 11/08/2017 07:58 PM, 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/mpc8544_guts.c b/hw/ppc/mpc8544_guts.c
> index ce1254b5d4..3a2c49e3fd 100644
> --- a/hw/ppc/mpc8544_guts.c
> +++ b/hw/ppc/mpc8544_guts.c
> @@ -18,6 +18,7 @@
> */
>
> #include "qemu/osdep.h"
> +#include "qemu/error-report.h"
> #include "qemu-common.h"
> #include "cpu.h"
> #include "hw/hw.h"
> @@ -83,7 +84,7 @@ static uint64_t mpc8544_guts_read(void *opaque, hwaddr addr,
> value = env->spr[SPR_E500_SVR];
> break;
> default:
> - fprintf(stderr, "guts: Unknown register read: %x\n", (int)addr);
> + error_report("guts: Unknown register read: %x", (int)addr);
Alexander: Should this be reported as UNIMP or GUEST_ERROR?
> break;
> }
>
> @@ -102,7 +103,7 @@ static void mpc8544_guts_write(void *opaque, hwaddr addr,
> }
> break;
> default:
> - fprintf(stderr, "guts: Unknown register write: %x = %x\n",
> + error_report("guts: Unknown register write: %x = %x",
> (int)addr, (unsigned)value);
> break;
> }
Thanks,
Phil.