util: drop qemu_socket_try_set_nonblock()
Now we can use qemu_set_blocking() in these cases. Reviewed-by: Peter Xu <peterx@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
8cb17f9c36
commit
09759245cf
7 changed files with 12 additions and 40 deletions
|
|
@ -270,10 +270,6 @@ void qemu_socket_set_block(int fd)
|
|||
g_unix_set_fd_nonblocking(fd, false, NULL);
|
||||
}
|
||||
|
||||
int qemu_socket_try_set_nonblock(int fd)
|
||||
{
|
||||
return g_unix_set_fd_nonblocking(fd, true, NULL) ? 0 : -errno;
|
||||
}
|
||||
|
||||
int socket_set_fast_reuse(int fd)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -202,15 +202,6 @@ void qemu_socket_set_block(int fd)
|
|||
ioctlsocket(fd, FIONBIO, &opt);
|
||||
}
|
||||
|
||||
int qemu_socket_try_set_nonblock(int fd)
|
||||
{
|
||||
unsigned long opt = 1;
|
||||
if (ioctlsocket(fd, FIONBIO, &opt) != NO_ERROR) {
|
||||
return -socket_error();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int socket_set_fast_reuse(int fd)
|
||||
{
|
||||
/* Enabling the reuse of an endpoint that was used by a socket still in
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue