mdbx-tools: hide '-n' option (NOSUBDIR) since now it guessed automatically.

Change-Id: I8668ec919f2f90b133270a566f380066dbb8589f
This commit is contained in:
Leonid Yuriev 2020-04-30 01:19:51 +03:00
parent b3f375c57f
commit 1488457641
5 changed files with 18 additions and 24 deletions

View File

@ -765,19 +765,17 @@ bailout:
} }
static void usage(char *prog) { static void usage(char *prog) {
fprintf( fprintf(stderr,
stderr, "usage: %s [-V] [-v] [-q] [-c] [-w] [-d] [-i] [-s subdb] dbpath\n"
"usage: %s [-V] [-v] [-n] [-q] [-c] [-w] [-d] [-i] [-s subdb] dbpath\n" " -V\t\tprint version and exit\n"
" -V\t\tprint version and exit\n" " -v\t\tmore verbose, could be used multiple times\n"
" -v\t\tmore verbose, could be used multiple times\n" " -q\t\tbe quiet\n"
" -n\t\tNOSUBDIR mode for open\n" " -c\t\tforce cooperative mode (don't try exclusive)\n"
" -q\t\tbe quiet\n" " -w\t\tlock DB for writing while checking\n"
" -c\t\tforce cooperative mode (don't try exclusive)\n" " -d\t\tdisable page-by-page traversal of B-tree\n"
" -w\t\tlock DB for writing while checking\n" " -i\t\tignore wrong order errors (for custom comparators case)\n"
" -d\t\tdisable page-by-page traversal of B-tree\n" " -s subdb\tprocess a specific subdatabase only\n",
" -i\t\tignore wrong order errors (for custom comparators case)\n" prog);
" -s subdb\tprocess a specific subdatabase only\n",
prog);
exit(EXIT_INTERRUPTED); exit(EXIT_INTERRUPTED);
} }

View File

@ -45,11 +45,10 @@ static void signal_handler(int sig) {
static void usage(const char *prog) { static void usage(const char *prog) {
fprintf(stderr, fprintf(stderr,
"usage: %s [-V] [-q] [-c] [-n] src_path [dest_path]\n" "usage: %s [-V] [-q] [-c] src_path [dest_path]\n"
" -V\t\tprint version and exit\n" " -V\t\tprint version and exit\n"
" -q\t\tbe quiet\n" " -q\t\tbe quiet\n"
" -c\t\tenable compactification (skip unused pages)\n" " -c\t\tenable compactification (skip unused pages)\n"
" -n\t\tNOSUBDIR mode for open\n"
" src_path\tsource database\n" " src_path\tsource database\n"
" dest_path\tdestination (stdout if not specified)\n", " dest_path\tdestination (stdout if not specified)\n",
prog); prog);

View File

@ -160,7 +160,7 @@ static int dumpit(MDBX_txn *txn, MDBX_dbi dbi, char *name) {
static void usage(char *prog) { static void usage(char *prog) {
fprintf(stderr, fprintf(stderr,
"usage: %s [-V] [-q] [-f file] [-l] [-p] [-a|-s subdb] [-r] [-n] " "usage: %s [-V] [-q] [-f file] [-l] [-p] [-a|-s subdb] [-r] "
"dbpath\n" "dbpath\n"
" -V\t\tprint version and exit\n" " -V\t\tprint version and exit\n"
" -q\t\tbe quiet\n" " -q\t\tbe quiet\n"
@ -170,8 +170,7 @@ static void usage(char *prog) {
" -a\t\tdump main DB and all subDBs,\n" " -a\t\tdump main DB and all subDBs,\n"
" \t\tby default dump only the main DB\n" " \t\tby default dump only the main DB\n"
" -s\t\tdump only the named subDB\n" " -s\t\tdump only the named subDB\n"
" -r\t\trescure mode (ignore errors to dump corrupted DB)\n" " -r\t\trescure mode (ignore errors to dump corrupted DB)\n",
" -n\t\tNOSUBDIR mode for open\n",
prog); prog);
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }

View File

@ -335,7 +335,7 @@ static int readline(MDBX_val *out, MDBX_val *buf) {
static void usage(void) { static void usage(void) {
fprintf(stderr, fprintf(stderr,
"usage: %s [-V] [-q] [-a] [-f file] [-s name] [-N] [-T] [-r] [-n] " "usage: %s [-V] [-q] [-a] [-f file] [-s name] [-N] [-T] [-r] "
"dbpath\n" "dbpath\n"
" -V\t\tprint version and exit\n" " -V\t\tprint version and exit\n"
" -q\t\tbe quiet\n" " -q\t\tbe quiet\n"
@ -345,8 +345,7 @@ static void usage(void) {
" -s name\tload into named subDB\n" " -s name\tload into named subDB\n"
" -N\t\tuse NOOVERWRITE on puts\n" " -N\t\tuse NOOVERWRITE on puts\n"
" -T\t\tread plaintext\n" " -T\t\tread plaintext\n"
" -r\t\trescure mode (ignore errors to load corrupted DB dump)\n" " -r\t\trescure mode (ignore errors to load corrupted DB dump)\n",
" -n\t\tNOSUBDIR mode for open\n",
prog); prog);
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }

View File

@ -54,15 +54,14 @@ static void prstat(MDBX_stat *ms) {
static void usage(char *prog) { static void usage(char *prog) {
fprintf(stderr, fprintf(stderr,
"usage: %s [-V] [-e] [-f[f[f]]] [-r[r]] [-a|-s name] [-n] dbpath\n" "usage: %s [-V] [-e] [-f[f[f]]] [-r[r]] [-a|-s name] dbpath\n"
" -V\t\tprint version and exit\n" " -V\t\tprint version and exit\n"
" -e\t\tshow whole DB info\n" " -e\t\tshow whole DB info\n"
" -f\t\tshow GC info\n" " -f\t\tshow GC info\n"
" -r\t\tshow readers\n" " -r\t\tshow readers\n"
" -a\t\tprint stat of main DB and all subDBs\n" " -a\t\tprint stat of main DB and all subDBs\n"
" \t\t(default) print stat of only the main DB\n" " \t\t(default) print stat of only the main DB\n"
" -s name\tprint stat of only the named subDB\n" " -s name\tprint stat of only the named subDB\n",
" -n\t\tNOSUBDIR mode for open\n",
prog); prog);
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }