mirror of
https://github.com/mii443/qemu.git
synced 2025-08-22 23:25:48 +00:00
chardev: replace qemu_set_nonblock()
Those calls are either for 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:
@ -271,7 +271,10 @@ static void qmp_chardev_open_serial(Chardev *chr,
|
||||
if (fd < 0) {
|
||||
return;
|
||||
}
|
||||
qemu_set_nonblock(fd);
|
||||
if (!g_unix_set_fd_nonblocking(fd, true, NULL)) {
|
||||
error_setg_errno(errp, errno, "Failed to set FD nonblocking");
|
||||
return;
|
||||
}
|
||||
tty_serial_init(fd, 115200, 'N', 8, 1);
|
||||
|
||||
qemu_chr_open_fd(chr, fd, fd);
|
||||
|
Reference in New Issue
Block a user