hw/input: replace fprint with LOG_GUEST_ERROR
Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Marc-André Lureau committed
Jun 8, 2026 at 17:20 UTC
f548310c8c6c47bdc8e81595cbdaf2e441c92f36
1 file changed
+7
-5
hw/input/virtio-input-hid.c
+7
-5
@@ -6,6 +6,7 @@
6
7
#include "qemu/osdep.h"
8
#include "qemu/iov.h"
9
+#include "qemu/log.h"
10
#include "qemu/module.h"
11
12
#include "hw/virtio/virtio.h"
@@ -107,9 +108,9 @@ static void virtio_input_handle_event(DeviceState *dev, QemuConsole *src,
108
virtio_input_send(vinput, &event);
109
} else {
110
if (evt->btn.down) {
110
- fprintf(stderr, "%s: unmapped button: %d [%s]\n", __func__,
111
- evt->btn.button,
112
- InputButton_str(evt->btn.button));
111
+ qemu_log_mask(LOG_GUEST_ERROR,
112
+ "%s: unmapped button: %d [%s]\n", __func__,
113
+ evt->btn.button, InputButton_str(evt->btn.button));
114
}
115
}
116
break;
@@ -210,8 +211,9 @@ static void virtio_input_hid_handle_status(VirtIOInput *vinput,
211
kbd_put_ledstate(vhid->ledstate);
212
break;
213
default:
213
- fprintf(stderr, "%s: unknown type %d\n", __func__,
214
- le16_to_cpu(event->type));
214
+ qemu_log_mask(LOG_GUEST_ERROR,
215
+ "%s: unknown type %d\n", __func__,
216
+ le16_to_cpu(event->type));
217
break;
218
}
219
}