mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 14:25:26 +00:00
socket-util: fsync directory for Windows.
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@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
This commit is contained in:
@@ -1033,6 +1033,7 @@ int
|
||||
fsync_parent_dir(const char *file_name)
|
||||
{
|
||||
int error = 0;
|
||||
#ifndef _WIN32
|
||||
char *dir;
|
||||
int fd;
|
||||
|
||||
@@ -1054,6 +1055,7 @@ fsync_parent_dir(const char *file_name)
|
||||
VLOG_ERR("%s: open failed (%s)", dir, ovs_strerror(error));
|
||||
}
|
||||
free(dir);
|
||||
#endif
|
||||
|
||||
return error;
|
||||
}
|
||||
|
Reference in New Issue
Block a user