Commit 84cf6125 authored by Rich Prohaska's avatar Rich Prohaska Committed by Yoni Fogel

add interactive help to brtdump. closes #1732

git-svn-id: file:///svn/toku/tokudb@11637 c7de825b-a66e-492c-adef-691d508d4ae1
parent dca1d5ce
...@@ -246,6 +246,17 @@ dump_node_wrapper(BLOCKNUM b, int64_t UU(size), int64_t UU(address), void *extra ...@@ -246,6 +246,17 @@ dump_node_wrapper(BLOCKNUM b, int64_t UU(size), int64_t UU(address), void *extra
return 0; return 0;
} }
static void
interactive_help(void) {
fprintf(stderr, "help\n");
fprintf(stderr, "header\n");
fprintf(stderr, "node NUMBER\n");
fprintf(stderr, "bx [OFFSET]\n");
fprintf(stderr, "fragmentation\n");
fprintf(stderr, "file OFFSET SIZE\n");
fprintf(stderr, "quit\n");
}
int int
main (int argc, const char *argv[]) { main (int argc, const char *argv[]) {
const char *arg0 = argv[0]; const char *arg0 = argv[0];
...@@ -281,7 +292,9 @@ main (int argc, const char *argv[]) { ...@@ -281,7 +292,9 @@ main (int argc, const char *argv[]) {
int nfields = split_fields(line, fields, maxfields); int nfields = split_fields(line, fields, maxfields);
if (nfields == 0) if (nfields == 0)
continue; continue;
if (strcmp(fields[0], "header") == 0) { if (strcmp(fields[0], "help") == 0) {
interactive_help();
} else if (strcmp(fields[0], "header") == 0) {
toku_brtheader_free(h); toku_brtheader_free(h);
dump_header(f, &h); dump_header(f, &h);
} else if (strcmp(fields[0], "node") == 0 && nfields == 2) { } else if (strcmp(fields[0], "node") == 0 && nfields == 2) {
......
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