summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé2021-01-12 12:29:55 +0100
committerLaurent Vivier2021-01-18 11:51:26 +0100
commit580e733321511ab4eda7d6ca14ca157d71ea8728 (patch)
tree237ab21949bf979aa0ba8623bb84f2d203fc7cab
parentmisc/mos6522: Use timer_free() in the finalize function to avoid memleak (diff)
downloadqemu-580e733321511ab4eda7d6ca14ca157d71ea8728.tar.gz
qemu-580e733321511ab4eda7d6ca14ca157d71ea8728.tar.xz
qemu-580e733321511ab4eda7d6ca14ca157d71ea8728.zip
hw/ide/ahci: Replace fprintf() by qemu_log_mask(GUEST_ERROR)
Replace fprintf() calls by qemu_log_mask(LOG_GUEST_ERROR). Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-Id: <20210112112955.1849212-1-philmd@redhat.com> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
-rw-r--r--hw/ide/ahci.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c
index 4b675b9cfd..6d50482b8d 100644
--- a/hw/ide/ahci.c
+++ b/hw/ide/ahci.c
@@ -465,8 +465,9 @@ static void ahci_mem_write(void *opaque, hwaddr addr,
/* Only aligned reads are allowed on AHCI */
if (addr & 3) {
- fprintf(stderr, "ahci: Mis-aligned write to addr 0x"
- TARGET_FMT_plx "\n", addr);
+ qemu_log_mask(LOG_GUEST_ERROR,
+ "ahci: Mis-aligned write to addr 0x%03" HWADDR_PRIX "\n",
+ addr);
return;
}
@@ -1111,7 +1112,8 @@ static void process_ncq_command(AHCIState *s, int port, uint8_t *cmd_fis,
g_assert(is_ncq(ncq_fis->command));
if (ncq_tfs->used) {
/* error - already in use */
- fprintf(stderr, "%s: tag %d already used\n", __func__, tag);
+ qemu_log_mask(LOG_GUEST_ERROR, "%s: tag %d already used\n",
+ __func__, tag);
return;
}