Skip to content
Snippets Groups Projects
Commit b2670d1f authored by Marc-André Lureau's avatar Marc-André Lureau
Browse files

tests: replace qemu_set_nonblock()


The call is POSIX-specific. Use the dedicated GLib API.

(this is a preliminary patch before renaming qemu_set_nonblock())

Signed-off-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
Reviewed-by: default avatarThomas Huth <thuth@redhat.com>
parent a8208626
No related branches found
No related tags found
No related merge requests found
......@@ -302,6 +302,7 @@ static int chr_can_read(void *opaque)
static void chr_read(void *opaque, const uint8_t *buf, int size)
{
g_autoptr(GError) err = NULL;
TestServer *s = opaque;
CharBackend *chr = &s->chr;
VhostUserMsg msg;
......@@ -394,7 +395,8 @@ static void chr_read(void *opaque, const uint8_t *buf, int size)
* The receive function forces it to be blocking,
* so revert it back to non-blocking.
*/
qemu_set_nonblock(fd);
g_unix_set_fd_nonblocking(fd, true, &err);
g_assert_no_error(err);
break;
case VHOST_USER_SET_LOG_BASE:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment