ovsdb: Do not look for symbolic links for db creation in Windows.
authorGurucharan Shetty <gshetty@nicira.com>
Mon, 10 Mar 2014 22:47:30 +0000 (15:47 -0700)
committerGurucharan Shetty <gshetty@nicira.com>
Thu, 13 Mar 2014 16:13:15 +0000 (09:13 -0700)
We start with not supporting symbolic links for database
creation in Windows.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
ovsdb/log.c

index 807b983..48fa847 100644 (file)
@@ -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();
     }