aboutsummaryrefslogtreecommitdiff
path: root/ovsdb
diff options
context:
space:
mode:
authorGurucharan Shetty <gshetty@nicira.com>2014-05-08 13:31:18 -0700
committerGurucharan Shetty <gshetty@nicira.com>2014-05-14 14:45:19 -0700
commit3e94784cb7202847ecde47e389a377ff0003c285 (patch)
treea83bcb6c4d8d3add9072bef816046843f0d367e9 /ovsdb
parent52ca734e820d6b183aba5ca1c7d714f3c7e7a781 (diff)
ovsdb: Open database in binary mode.
Some ovsdb-tool related unit tests fail with bad checksum errors while reading transactions from database. It is most likely because of the CR at the end of line. Using binary mode solves the problem. Signed-off-by: Gurucharan Shetty <gshetty@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'ovsdb')
-rw-r--r--ovsdb/log.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ovsdb/log.c b/ovsdb/log.c
index 48fa84791..1e4c75ef2 100644
--- a/ovsdb/log.c
+++ b/ovsdb/log.c
@@ -108,6 +108,9 @@ ovsdb_log_open(const char *name, enum ovsdb_log_open_mode open_mode,
} else {
OVS_NOT_REACHED();
}
+#ifdef _WIN32
+ flags = flags | O_BINARY;
+#endif
fd = open(name, flags, 0666);
if (fd < 0) {
const char *op = open_mode == OVSDB_LOG_CREATE ? "create" : "open";