[ovs-dev] [PATCH 11/14] socket-util: fsync directory for Windows.

Gurucharan Shetty shettyg at nicira.com
Wed Feb 19 23:36:22 UTC 2014


There is no corresponding function for Windows.
open() does not work on directories.
There is a function _commit(fd), but that is only meant
for files.

Signed-off-by: Gurucharan Shetty <gshetty at nicira.com>
---
 lib/socket-util.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/socket-util.c b/lib/socket-util.c
index d3b580d..b085007 100644
--- a/lib/socket-util.c
+++ b/lib/socket-util.c
@@ -1095,6 +1095,7 @@ int
 fsync_parent_dir(const char *file_name)
 {
     int error = 0;
+#ifndef _WIN32
     char *dir;
     int fd;
 
@@ -1116,6 +1117,7 @@ fsync_parent_dir(const char *file_name)
         VLOG_ERR("%s: open failed (%s)", dir, ovs_strerror(error));
     }
     free(dir);
+#endif
 
     return error;
 }
-- 
1.7.9.5




More information about the dev mailing list