From ff5927baa7ffb9c97873a071f6a8d85a3584182b Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Mon, 25 Apr 2022 17:33:47 +0400 Subject: util: rename qemu_*block() socket functions The qemu_*block() functions are meant to be be used with sockets (the win32 implementation expects SOCKET) Over time, those functions where used with Win32 SOCKET or file-descriptors interchangeably. But for portability, they must only be used with socket-like file-descriptors. FDs can use g_unix_set_fd_nonblocking() instead. Rename the functions with "socket" in the name to prevent bad usages. This is effectively reverting commit f9e8cacc5557e43 ("oslib-posix: rename socket_set_nonblock() to qemu_set_nonblock()"). Signed-off-by: Marc-André Lureau Reviewed-by: Stefan Hajnoczi --- util/vhost-user-server.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'util/vhost-user-server.c') diff --git a/util/vhost-user-server.c b/util/vhost-user-server.c index f66fbba710..232984ace6 100644 --- a/util/vhost-user-server.c +++ b/util/vhost-user-server.c @@ -65,7 +65,7 @@ static void vmsg_unblock_fds(VhostUserMsg *vmsg) { int i; for (i = 0; i < vmsg->fd_num; i++) { - qemu_set_nonblock(vmsg->fds[i]); + qemu_socket_set_nonblock(vmsg->fds[i]); } } @@ -270,7 +270,7 @@ set_watch(VuDev *vu_dev, int fd, int vu_evt, vu_fd_watch->fd = fd; vu_fd_watch->cb = cb; - qemu_set_nonblock(fd); + qemu_socket_set_nonblock(fd); aio_set_fd_handler(server->ioc->ctx, fd, true, kick_handler, NULL, NULL, NULL, vu_fd_watch); vu_fd_watch->vu_dev = vu_dev; -- cgit v1.2.3-55-g7522