aboutsummaryrefslogtreecommitdiff
path: root/hw/input
diff options
context:
space:
mode:
Diffstat (limited to 'hw/input')
-rw-r--r--hw/input/hid.c1
-rw-r--r--hw/input/virtio-input-host.c3
2 files changed, 2 insertions, 2 deletions
diff --git a/hw/input/hid.c b/hw/input/hid.c
index 76bedc1..de24cd0 100644
--- a/hw/input/hid.c
+++ b/hw/input/hid.c
@@ -478,6 +478,7 @@ int hid_keyboard_write(HIDState *hs, uint8_t *buf, int len)
ledstate |= QEMU_CAPS_LOCK_LED;
}
kbd_put_ledstate(ledstate);
+ return 1;
}
return 0;
}
diff --git a/hw/input/virtio-input-host.c b/hw/input/virtio-input-host.c
index bbfee9d..9f62532 100644
--- a/hw/input/virtio-input-host.c
+++ b/hw/input/virtio-input-host.c
@@ -114,8 +114,7 @@ static void virtio_input_host_realize(DeviceState *dev, Error **errp)
error_setg_file_open(errp, errno, vih->evdev);
return;
}
- if (!g_unix_set_fd_nonblocking(vih->fd, true, NULL)) {
- error_setg_errno(errp, errno, "Failed to set FD nonblocking");
+ if (!qemu_set_blocking(vih->fd, false, errp)) {
goto err_close;
}