summaryrefslogtreecommitdiffstats
path: root/include/qemu
diff options
context:
space:
mode:
authorMarc-André Lureau2022-04-25 15:33:47 +0200
committerMarc-André Lureau2022-05-03 13:53:20 +0200
commitff5927baa7ffb9c97873a071f6a8d85a3584182b (patch)
treefac232e795ec7f76ad8ca15a59a7d8b908e7a225 /include/qemu
parenttests: replace qemu_set_nonblock() (diff)
downloadqemu-ff5927baa7ffb9c97873a071f6a8d85a3584182b.tar.gz
qemu-ff5927baa7ffb9c97873a071f6a8d85a3584182b.tar.xz
qemu-ff5927baa7ffb9c97873a071f6a8d85a3584182b.zip
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 <marcandre.lureau@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'include/qemu')
-rw-r--r--include/qemu/sockets.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/qemu/sockets.h b/include/qemu/sockets.h
index 0c34bf2398..038faa157f 100644
--- a/include/qemu/sockets.h
+++ b/include/qemu/sockets.h
@@ -17,9 +17,9 @@ int qemu_socket(int domain, int type, int protocol);
int qemu_accept(int s, struct sockaddr *addr, socklen_t *addrlen);
int socket_set_cork(int fd, int v);
int socket_set_nodelay(int fd);
-void qemu_set_block(int fd);
-int qemu_try_set_nonblock(int fd);
-void qemu_set_nonblock(int fd);
+void qemu_socket_set_block(int fd);
+int qemu_socket_try_set_nonblock(int fd);
+void qemu_socket_set_nonblock(int fd);
int socket_set_fast_reuse(int fd);
#ifdef WIN32