summaryrefslogtreecommitdiff
path: root/src/utilities/util_main.c
diff options
context:
space:
mode:
authorKeith Bostic <keith@wiredtiger.com>2012-10-16 15:37:43 +0000
committerKeith Bostic <keith@wiredtiger.com>2012-10-16 15:37:43 +0000
commitade9bdfc43c152a4675c14408e78d9ca105a0420 (patch)
treead31695c530ae60f05e8e893a1265fc7ab0ff003 /src/utilities/util_main.c
parent08a9eb79bc99320b72391c30c10de79715b71f91 (diff)
downloadmongo-ade9bdfc43c152a4675c14408e78d9ca105a0420.tar.gz
Add a "wt compact" utility command.
Diffstat (limited to 'src/utilities/util_main.c')
-rw-r--r--src/utilities/util_main.c43
1 files changed, 23 insertions, 20 deletions
diff --git a/src/utilities/util_main.c b/src/utilities/util_main.c
index 6ae9227c8a2..8c22778006e 100644
--- a/src/utilities/util_main.c
+++ b/src/utilities/util_main.c
@@ -111,6 +111,8 @@ main(int argc, char *argv[])
case 'c':
if (strcmp(command, "create") == 0)
ret = util_create(session, argc, argv);
+ else if (strcmp(command, "compact") == 0)
+ ret = util_compact(session, argc, argv);
else
ret = usage();
break;
@@ -191,28 +193,29 @@ usage(void)
WIREDTIGER_VERSION_MAJOR, WIREDTIGER_VERSION_MINOR);
fprintf(stderr,
"global options:\n"
- "\t-C\twiredtiger_open configuration\n"
- "\t-h\tdatabase directory\n"
- "\t-V\tdisplay library version and exit\n"
- "\t-v\tverbose\n");
+ "\t" "-C\twiredtiger_open configuration\n"
+ "\t" "-h\tdatabase directory\n"
+ "\t" "-V\tdisplay library version and exit\n"
+ "\t" "-v\tverbose\n");
fprintf(stderr,
"commands:\n"
- "\tbackup database backup\n"
- "\tcopyright copyright information\n"
- "\tcreate\t create an object\n"
- "\tdrop\t drop an object\n"
- "\tdump\t dump an object\n"
- "\tdumpfile dump a physical file in debugging format\n"
- "\tlist\t list database objects\n"
- "\tload\t load an object\n"
- "\tprintlog display the database log\n"
- "\tread\t read values from an object\n"
- "\trename\t rename an object\n"
- "\tsalvage\t salvage a file\n"
- "\tstat\t display statistics for an object\n"
- "\tupgrade\t upgrade an object\n"
- "\tverify\t verify an object\n"
- "\twrite\t write values to an object\n");
+ "\t" "backup database backup\n"
+ "\t" "compact\t compact an object\n"
+ "\t" "copyright copyright information\n"
+ "\t" "create\t create an object\n"
+ "\t" "drop\t drop an object\n"
+ "\t" "dump\t dump an object\n"
+ "\t" "dumpfile dump a physical file in debugging format\n"
+ "\t" "list\t list database objects\n"
+ "\t" "load\t load an object\n"
+ "\t" "printlog display the database log\n"
+ "\t" "read\t read values from an object\n"
+ "\t" "rename\t rename an object\n"
+ "\t" "salvage\t salvage a file\n"
+ "\t" "stat\t display statistics for an object\n"
+ "\t" "upgrade\t upgrade an object\n"
+ "\t" "verify\t verify an object\n"
+ "\t" "write\t write values to an object\n");
return (EXIT_FAILURE);
}