qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 09/10] block: move fcntl_setfl()


From: Richard Henderson
Subject: Re: [PATCH 09/10] block: move fcntl_setfl()
Date: Fri, 22 Apr 2022 05:20:43 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0

On 4/22/22 01:36, marcandre.lureau@redhat.com wrote:
+/* Sets a specific flag */
+static int fcntl_setfl(int fd, int flag)
+{
+    int flags;
+
+    flags = fcntl(fd, F_GETFL);
+    if (flags == -1)
+        return -errno;
+
+    if (fcntl(fd, F_SETFL, flags | flag) == -1)
+        return -errno;
+
+    return 0;
+}
+
  static int raw_reconfigure_getfd(BlockDriverState *bs, int flags,
                                   int *open_flags, uint64_t perm, bool 
force_dup,
                                   Error **errp)
diff --git a/util/oslib-posix.c b/util/oslib-posix.c
index 543c9944b083..1c231087408f 100644
--- a/util/oslib-posix.c
+++ b/util/oslib-posix.c
@@ -794,21 +794,6 @@ size_t qemu_get_host_physmem(void)
      return 0;
  }
-/* Sets a specific flag */
-int fcntl_setfl(int fd, int flag)
-{
-    int flags;
-
-    flags = fcntl(fd, F_GETFL);
-    if (flags == -1) {
-        return -errno;
-    }
-    if (fcntl(fd, F_SETFL, flags | flag) == -1) {
-        return -errno;
-    }
-    return 0;
-}

Lost braces in the move.

r~



reply via email to

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