mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
hw: replace qemu_set_nonblock()
Those calls are non-socket fd, or are POSIX-specific. Use the dedicated GLib API. (qemu_set_nonblock() is for socket-like) (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>
This commit is contained in:
parent
b0a8f9adfe
commit
701544cfaf
2 changed files with 11 additions and 5 deletions
|
@ -114,7 +114,10 @@ static void virtio_input_host_realize(DeviceState *dev, Error **errp)
|
|||
error_setg_file_open(errp, errno, vih->evdev);
|
||||
return;
|
||||
}
|
||||
qemu_set_nonblock(vih->fd);
|
||||
if (!g_unix_set_fd_nonblocking(vih->fd, true, NULL)) {
|
||||
error_setg_errno(errp, errno, "Failed to set FD nonblocking");
|
||||
goto err_close;
|
||||
}
|
||||
|
||||
rc = ioctl(vih->fd, EVIOCGVERSION, &ver);
|
||||
if (rc < 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue