[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 3/4] hw/char/xilinx_uartlite: Replace hw_error() by qemu_log_mask
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 3/4] hw/char/xilinx_uartlite: Replace hw_error() by qemu_log_mask() |
Date: |
Mon, 18 May 2020 11:52:02 +0200 |
hw_error() calls exit(). This a bit overkill when we can log
the accesses as unimplemented or guest error.
When fuzzing the devices, we don't want the whole process to
exit. Replace some hw_error() calls by qemu_log_mask().
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
---
hw/char/xilinx_uartlite.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/hw/char/xilinx_uartlite.c b/hw/char/xilinx_uartlite.c
index c6512285d7..ae4ccd00c7 100644
--- a/hw/char/xilinx_uartlite.c
+++ b/hw/char/xilinx_uartlite.c
@@ -23,7 +23,7 @@
*/
#include "qemu/osdep.h"
-#include "hw/hw.h"
+#include "qemu/log.h"
#include "hw/irq.h"
#include "hw/qdev-properties.h"
#include "hw/sysbus.h"
@@ -135,7 +135,8 @@ uart_write(void *opaque, hwaddr addr,
switch (addr)
{
case R_STATUS:
- hw_error("write to UART STATUS?\n");
+ qemu_log_mask(LOG_GUEST_ERROR, "%s: write to UART STATUS\n",
+ __func__);
break;
case R_CTRL:
--
2.21.3
- [PATCH 0/4] hw/arm: Replace hw_error() by qemu_log_mask(), Philippe Mathieu-Daudé, 2020/05/18
- [PATCH 2/4] hw/arm/pxa2xx: Replace hw_error() by qemu_log_mask(), Philippe Mathieu-Daudé, 2020/05/18
- [PATCH 3/4] hw/char/xilinx_uartlite: Replace hw_error() by qemu_log_mask(),
Philippe Mathieu-Daudé <=
- [PATCH 1/4] hw/arm/integratorcp: Replace hw_error() by qemu_log_mask(), Philippe Mathieu-Daudé, 2020/05/18
- [PATCH 4/4] hw/timer/exynos4210_mct: Replace hw_error() by qemu_log_mask(), Philippe Mathieu-Daudé, 2020/05/18
- Re: [PATCH 0/4] hw/arm: Replace hw_error() by qemu_log_mask(), no-reply, 2020/05/18
- Re: [PATCH 0/4] hw/arm: Replace hw_error() by qemu_log_mask(), no-reply, 2020/05/18