qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] vhost-user+postcopy: Use qemu_set_nonblock


From: Dr. David Alan Gilbert (git)
Subject: [Qemu-devel] [PATCH] vhost-user+postcopy: Use qemu_set_nonblock
Date: Wed, 2 May 2018 11:55:52 +0100

From: "Dr. David Alan Gilbert" <address@hidden>

Use qemu_set_nonblock rather than a simple fcntl; cleaner
and I have no reason to change other flags.

Reported-by: Peter Maydell <address@hidden>
Signed-off-by: Dr. David Alan Gilbert <address@hidden>
---
 hw/virtio/vhost-user.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c
index 38da8692bb..c2bbb622d6 100644
--- a/hw/virtio/vhost-user.c
+++ b/hw/virtio/vhost-user.c
@@ -1076,7 +1076,7 @@ static int vhost_user_postcopy_advise(struct vhost_dev 
*dev, Error **errp)
         error_setg(errp, "%s: Failed to get ufd", __func__);
         return -1;
     }
-    fcntl(ufd, F_SETFL, O_NONBLOCK);
+    qemu_set_nonblock(ufd);
 
     /* register ufd with userfault thread */
     u->postcopy_fd.fd = ufd;
-- 
2.17.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]