aboutsummaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/oslib-posix.c8
-rw-r--r--util/oslib-win32.c8
-rw-r--r--util/vhost-user-server.c4
3 files changed, 10 insertions, 10 deletions
diff --git a/util/oslib-posix.c b/util/oslib-posix.c
index 72f25e599d..477990f39b 100644
--- a/util/oslib-posix.c
+++ b/util/oslib-posix.c
@@ -224,20 +224,20 @@ void qemu_anon_ram_free(void *ptr, size_t size)
qemu_ram_munmap(-1, ptr, size);
}
-void qemu_set_block(int fd)
+void qemu_socket_set_block(int fd)
{
g_unix_set_fd_nonblocking(fd, false, NULL);
}
-int qemu_try_set_nonblock(int fd)
+int qemu_socket_try_set_nonblock(int fd)
{
return g_unix_set_fd_nonblocking(fd, true, NULL) ? 0 : -errno;
}
-void qemu_set_nonblock(int fd)
+void qemu_socket_set_nonblock(int fd)
{
int f;
- f = qemu_try_set_nonblock(fd);
+ f = qemu_socket_try_set_nonblock(fd);
assert(f == 0);
}
diff --git a/util/oslib-win32.c b/util/oslib-win32.c
index 9c1e8121fd..dafef4f157 100644
--- a/util/oslib-win32.c
+++ b/util/oslib-win32.c
@@ -184,14 +184,14 @@ static int socket_error(void)
}
}
-void qemu_set_block(int fd)
+void qemu_socket_set_block(int fd)
{
unsigned long opt = 0;
WSAEventSelect(fd, NULL, 0);
ioctlsocket(fd, FIONBIO, &opt);
}
-int qemu_try_set_nonblock(int fd)
+int qemu_socket_try_set_nonblock(int fd)
{
unsigned long opt = 1;
if (ioctlsocket(fd, FIONBIO, &opt) != NO_ERROR) {
@@ -200,9 +200,9 @@ int qemu_try_set_nonblock(int fd)
return 0;
}
-void qemu_set_nonblock(int fd)
+void qemu_socket_set_nonblock(int fd)
{
- (void)qemu_try_set_nonblock(fd);
+ (void)qemu_socket_try_set_nonblock(fd);
}
int socket_set_fast_reuse(int fd)
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;