aboutsummaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/event_notifier-posix.c3
-rw-r--r--util/qemu-sockets.c8
2 files changed, 5 insertions, 6 deletions
diff --git a/util/event_notifier-posix.c b/util/event_notifier-posix.c
index 8442c6e63c..ed4ca2b01e 100644
--- a/util/event_notifier-posix.c
+++ b/util/event_notifier-posix.c
@@ -85,7 +85,8 @@ int event_notifier_get_fd(EventNotifier *e)
int event_notifier_set_handler(EventNotifier *e,
EventNotifierHandler *handler)
{
- return qemu_set_fd_handler(e->rfd, (IOHandler *)handler, NULL, e);
+ qemu_set_fd_handler(e->rfd, (IOHandler *)handler, NULL, e);
+ return 0;
}
int event_notifier_set(EventNotifier *e)
diff --git a/util/qemu-sockets.c b/util/qemu-sockets.c
index f9ad34e40c..4026314435 100644
--- a/util/qemu-sockets.c
+++ b/util/qemu-sockets.c
@@ -244,7 +244,7 @@ static void wait_for_connect(void *opaque)
bool in_progress;
Error *err = NULL;
- qemu_set_fd_handler2(s->fd, NULL, NULL, NULL, NULL);
+ qemu_set_fd_handler(s->fd, NULL, NULL, NULL);
do {
rc = qemu_getsockopt(s->fd, SOL_SOCKET, SO_ERROR, &val, &valsize);
@@ -316,8 +316,7 @@ static int inet_connect_addr(struct addrinfo *addr, bool *in_progress,
if (connect_state != NULL && QEMU_SOCKET_RC_INPROGRESS(rc)) {
connect_state->fd = sock;
- qemu_set_fd_handler2(sock, NULL, NULL, wait_for_connect,
- connect_state);
+ qemu_set_fd_handler(sock, NULL, wait_for_connect, connect_state);
*in_progress = true;
} else if (rc < 0) {
error_setg_errno(errp, errno, "Failed to connect socket");
@@ -796,8 +795,7 @@ int unix_connect_opts(QemuOpts *opts, Error **errp,
if (connect_state != NULL && QEMU_SOCKET_RC_INPROGRESS(rc)) {
connect_state->fd = sock;
- qemu_set_fd_handler2(sock, NULL, NULL, wait_for_connect,
- connect_state);
+ qemu_set_fd_handler(sock, NULL, wait_for_connect, connect_state);
return sock;
} else if (rc >= 0) {
/* non blocking socket immediate success, call callback */