qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [RFC PATCH RDMA support v5: 12/12] don't set nonblock on in


From: mrhines
Subject: [Qemu-devel] [RFC PATCH RDMA support v5: 12/12] don't set nonblock on invalid file descriptor
Date: Mon, 8 Apr 2013 23:04:41 -0400

From: "Michael R. Hines" <address@hidden>

migration.c thinks this is an error for RDMA, but it's not.

Signed-off-by: Michael R. Hines <address@hidden>
---
 util/oslib-posix.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/util/oslib-posix.c b/util/oslib-posix.c
index 4e4b819..0b398f4 100644
--- a/util/oslib-posix.c
+++ b/util/oslib-posix.c
@@ -144,6 +144,8 @@ void qemu_set_block(int fd)
 void qemu_set_nonblock(int fd)
 {
     int f;
+    if(fd == -1)
+        return;
     f = fcntl(fd, F_GETFL);
     fcntl(fd, F_SETFL, f | O_NONBLOCK);
 }
-- 
1.7.10.4




reply via email to

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