Commit 0a0f508c authored by Yoni Fogel's avatar Yoni Fogel

reordered getopt args in tokudb_load.c

addresses #149

git-svn-id: file:///svn/tokudb@1050 c7de825b-a66e-492c-adef-691d508d4ae1
parent 794fa9ab
......@@ -74,23 +74,8 @@ int main(int argc, char *argv[]) {
ERROR(errno, "main: calloc\n");
goto error;
}
while ((ch = getopt(argc, argv, "nTVc:f:h:p:t:r:")) != EOF) {
while ((ch = getopt(argc, argv, "c:f:h:nP:r:Tt:V")) != EOF) {
switch (ch) {
case ('n'): {
/* g.overwritekeys = false; */
ERRORX("-%c option not supported.\n", ch);
goto error;
}
case ('T'): {
g.plaintext = true;
g.leadingspace = false;
g.header = false;
break;
}
case ('V'): {
printf("%s\n", db_version(NULL, NULL, NULL));
goto cleanup;
}
case ('c'): {
*next_config_option++ = optarg;
break;
......@@ -108,12 +93,27 @@ int main(int argc, char *argv[]) {
g.homedir = optarg;
break;
}
case ('p'): {
case ('n'): {
/* g.overwritekeys = false; */
ERRORX("-%c option not supported.\n", ch);
goto error;
}
case ('P'): {
/* Clear password. */
memset(optarg, 0, strlen(optarg));
ERRORX("-%c option not supported.\n", ch);
goto error;
}
case ('r'): {
ERRORX("-%c option not supported.\n", ch);
goto error;
}
case ('T'): {
g.plaintext = true;
g.leadingspace = false;
g.header = false;
break;
}
case ('t'): {
if (!strcmp(optarg, "btree")) {
g.dbtype = DB_BTREE;
......@@ -126,9 +126,9 @@ int main(int argc, char *argv[]) {
fprintf(stderr, "%s: Unrecognized db type %s.\n", g.progname, optarg);
goto error;
}
case ('r'): {
ERRORX("-%c option not supported.\n", ch);
goto error;
case ('V'): {
printf("%s\n", db_version(NULL, NULL, NULL));
goto cleanup;
}
case ('?'):
default: {
......
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