From: Gurucharan Shetty Date: Mon, 10 Mar 2014 22:47:30 +0000 (-0700) Subject: ovsdb: Do not look for symbolic links for db creation in Windows. X-Git-Tag: sliver-openvswitch-2.2.90-1~6^2~132 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=7470e8e62a4069eed23b283803787cad3a58d729;p=sliver-openvswitch.git ovsdb: Do not look for symbolic links for db creation in Windows. We start with not supporting symbolic links for database creation in Windows. Signed-off-by: Gurucharan Shetty Acked-by: Ben Pfaff --- diff --git a/ovsdb/log.c b/ovsdb/log.c index 807b98337..48fa84791 100644 --- a/ovsdb/log.c +++ b/ovsdb/log.c @@ -91,6 +91,7 @@ ovsdb_log_open(const char *name, enum ovsdb_log_open_mode open_mode, } else if (open_mode == OVSDB_LOG_READ_WRITE) { flags = O_RDWR; } else if (open_mode == OVSDB_LOG_CREATE) { +#ifndef _WIN32 if (stat(name, &s) == -1 && errno == ENOENT && lstat(name, &s) == 0 && S_ISLNK(s.st_mode)) { /* 'name' is a dangling symlink. We want to create the file that @@ -101,6 +102,9 @@ ovsdb_log_open(const char *name, enum ovsdb_log_open_mode open_mode, } else { flags = O_RDWR | O_CREAT | O_EXCL; } +#else + flags = O_RDWR | O_CREAT | O_EXCL; +#endif } else { OVS_NOT_REACHED(); }