X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng%2Flttng.c;h=64f3efa446530ed61663c9434eb77251cc923c91;hp=7058dd529d1ecd73e3a191f84e08b0883b54628e;hb=679b4943c3b0f451e7f4fbcd804dd8a7a679e253;hpb=8db8d1dc9f11aa7995b2f77bb938f2585005413c diff --git a/src/bin/lttng/lttng.c b/src/bin/lttng/lttng.c index 7058dd529..64f3efa44 100644 --- a/src/bin/lttng/lttng.c +++ b/src/bin/lttng/lttng.c @@ -263,9 +263,6 @@ static int handle_command(int argc, char **argv) case CMD_ERROR: ERR("Command error"); break; - case CMD_NOT_IMPLEMENTED: - ERR("Options not implemented"); - break; case CMD_UNDEFINED: ERR("Undefined command"); break; @@ -380,15 +377,19 @@ end: } /* - * Check for the "help" option in the argv. If found, return 1 else return 0. + * Check args for specific options that *must* not trigger a session daemon + * execution. + * + * Return 1 if match else 0. */ -static int check_help_command(int argc, char **argv) +static int check_args_no_sessiond(int argc, char **argv) { int i; for (i = 0; i < argc; i++) { if ((strncmp(argv[i], "-h", 2) == 0) || - strncmp(argv[i], "--h", 3) == 0) { + strncmp(argv[i], "--h", 3) == 0 || + strncmp(argv[i], "--list-options", 14)) { return 1; } } @@ -451,7 +452,7 @@ static int parse_args(int argc, char **argv) } /* Spawn session daemon if needed */ - if (opt_no_sessiond == 0 && check_help_command(argc, argv) == 0 && + if (opt_no_sessiond == 0 && check_args_no_sessiond(argc, argv) == 0 && (check_sessiond() < 0)) { goto error; }