Commit 7239050e authored by Yoni Fogel's avatar Yoni Fogel

Addresses #1531 Windows port of log_flush.c

git-svn-id: file:///svn/toku/tokudb@9968 c7de825b-a66e-492c-adef-691d508d4ae1
parent 79f4bed7
...@@ -10,13 +10,13 @@ ...@@ -10,13 +10,13 @@
static int static int
grep_for_in_logs (const char *str) { grep_for_in_logs (const char *str) {
#ifdef TOKUDB #ifdef TOKUDB
#define lname ENVDIR "//log000000000000.tokulog" #define lname ENVDIR "/log000000000000.tokulog"
#else #else
#define lname ENVDIR "//log.0000000001" #define lname ENVDIR "/log.0000000001"
#endif #endif
#define COMMAND "grep -F -o" #define COMMAND "grep -F -q"
char systembuf[strlen(str)+sizeof(COMMAND " \"\" " lname " > /dev/null")]; char systembuf[strlen(str)+sizeof(COMMAND " \"\" " lname)];
int bytes = snprintf(systembuf, sizeof(systembuf), COMMAND " \"%s\" %s > /dev/null", str, lname); int bytes = snprintf(systembuf, sizeof(systembuf), COMMAND " \"%s\" %s", str, lname);
assert(bytes>=0); assert(bytes>=0);
assert((size_t)bytes<sizeof(systembuf)); assert((size_t)bytes<sizeof(systembuf));
int r = system(systembuf); int r = system(systembuf);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment