[ovs-dev] [PATCH] ovsdb: Do not look for symbolic links for db creation.

Gurucharan Shetty shettyg at nicira.com
Wed Mar 12 18:21:15 UTC 2014


We start with not supporting symbolic links for database
creation in Windows.

Signed-off-by: Gurucharan Shetty <gshetty at nicira.com>
---
 ovsdb/log.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/ovsdb/log.c b/ovsdb/log.c
index 807b983..48fa847 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();
     }
-- 
1.7.9.5




More information about the dev mailing list