Hotfix/sangshuduo/td 6294 taosdemo long arg (#7680)
* [TD-6294]<fix>: taosdemo support long arg fix conflict with develop branch. * fix few words. * declare default child tables number. * add support email prompt. * support the way no space between param and value * fix uncatched status. * fix -PP arg. * fix total child tables bug. Co-authored-by: Shuduo Sang <sdsang@taosdata.com>
This commit is contained in:
parent
767bd33491
commit
bdfd86052d
|
@ -1381,6 +1381,8 @@ static void parse_args(int argc, char *argv[], SArguments *arguments) {
|
|||
errorUnreconized(argv[0], argv[i]);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
g_totalChildTables = arguments->num_of_tables;
|
||||
} else if ((0 == strncmp(argv[i], "-n", strlen("-n")))
|
||||
|| (0 == strncmp(argv[i], "--records", strlen("--records")))) {
|
||||
if (2 == strlen(argv[i])) {
|
||||
|
@ -1399,11 +1401,11 @@ static void parse_args(int argc, char *argv[], SArguments *arguments) {
|
|||
errorPrintReqArg2(argv[0], "--records");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
} else if (0 == strncmp(argv[i], "-r", strlen("-r"))) {
|
||||
if (isStringNumber((char *)(argv[i] + strlen("-r")))) {
|
||||
arguments->num_of_DPT = atoi((char *)(argv[i]+strlen("-r")));
|
||||
} else if (0 == strncmp(argv[i], "-n", strlen("-n"))) {
|
||||
if (isStringNumber((char *)(argv[i] + strlen("-n")))) {
|
||||
arguments->num_of_DPT = atoi((char *)(argv[i]+strlen("-n")));
|
||||
} else {
|
||||
errorPrintReqArg2(argv[0], "-r");
|
||||
errorPrintReqArg2(argv[0], "-n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
} else if (strlen("--records") == strlen(argv[i])) {
|
||||
|
@ -1419,8 +1421,6 @@ static void parse_args(int argc, char *argv[], SArguments *arguments) {
|
|||
errorUnreconized(argv[0], argv[i]);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
g_totalChildTables = arguments->num_of_DPT;
|
||||
} else if ((0 == strncmp(argv[i], "-d", strlen("-d")))
|
||||
|| (0 == strncmp(argv[i], "--database", strlen("--database")))) {
|
||||
if (2 == strlen(argv[i])) {
|
||||
|
|
Loading…
Reference in New Issue