aboutsummaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2022-04-25 17:39:06 +0400
committerMarc-André Lureau <marcandre.lureau@redhat.com>2022-05-03 15:52:37 +0400
commitc7b1172026a03b914e3534eb2d1d6a4c9b211a58 (patch)
tree8ee75305d6d4d1a44b7d35dce7ff53b6d3d56c81 /ui
parent701544cfaf46f24d912ad1714eb24641c3c96837 (diff)
downloadqemu-c7b1172026a03b914e3534eb2d1d6a4c9b211a58.zip
qemu-c7b1172026a03b914e3534eb2d1d6a4c9b211a58.tar.gz
qemu-c7b1172026a03b914e3534eb2d1d6a4c9b211a58.tar.bz2
ui: replace qemu_set_nonblock()
The call is POSIX-specific. Use the dedicated GLib API. (this is a preliminary patch before renaming qemu_set_nonblock()) Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Diffstat (limited to 'ui')
-rw-r--r--ui/input-linux.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ui/input-linux.c b/ui/input-linux.c
index 05c0c98..e572a2e 100644
--- a/ui/input-linux.c
+++ b/ui/input-linux.c
@@ -316,7 +316,10 @@ static void input_linux_complete(UserCreatable *uc, Error **errp)
error_setg_file_open(errp, errno, il->evdev);
return;
}
- qemu_set_nonblock(il->fd);
+ if (!g_unix_set_fd_nonblocking(il->fd, true, NULL)) {
+ error_setg_errno(errp, errno, "Failed to set FD nonblocking");
+ return;
+ }
rc = ioctl(il->fd, EVIOCGVERSION, &ver);
if (rc < 0) {