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>
} 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";