mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06: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:
parent
05e50e8fe5
commit
b84bb4dfe5
4 changed files with 14 additions and 5 deletions
|
@ -212,8 +212,8 @@ void qemu_chr_open_fd(Chardev *chr,
|
|||
FDChardev *s = FD_CHARDEV(chr);
|
||||
g_autofree char *name = NULL;
|
||||
|
||||
if (fd_out >= 0) {
|
||||
qemu_set_nonblock(fd_out);
|
||||
if (fd_out >= 0 && !g_unix_set_fd_nonblocking(fd_out, true, NULL)) {
|
||||
assert(!"Failed to set FD nonblocking");
|
||||
}
|
||||
|
||||
if (fd_out == fd_in && fd_in >= 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue