X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng%2Fcommands%2Fdestroy.c;h=39b4e9a2f6dbe00d0b6a63d6c372455dc07fbfb8;hb=0cda4f28041a221757fa2dfa8e91706e7a548090;hp=151686ff9061b157fa9b33aadd8c6924550e534b;hpb=10a8a2237343699e3923d87e24dbf2d7fe225377;p=lttng-tools.git diff --git a/src/bin/lttng/commands/destroy.c b/src/bin/lttng/commands/destroy.c index 151686ff9..39b4e9a2f 100644 --- a/src/bin/lttng/commands/destroy.c +++ b/src/bin/lttng/commands/destroy.c @@ -25,19 +25,19 @@ #include #include -#include "../cmd.h" -#include "../conf.h" -#include "../utils.h" +#include "../command.h" static char *opt_session_name; enum { OPT_HELP = 1, + OPT_LIST_OPTIONS, }; static struct poptOption long_options[] = { /* longName, shortName, argInfo, argPtr, value, descrip, argDesc */ {"help", 'h', POPT_ARG_NONE, 0, OPT_HELP, 0, 0}, + {"list-options", 0, POPT_ARG_NONE, NULL, OPT_LIST_OPTIONS, NULL, NULL}, {0, 0, 0, 0, 0, 0, 0} }; @@ -52,6 +52,7 @@ static void usage(FILE *ofp) fprintf(ofp, "get it from the configuration directory (.lttng).\n"); fprintf(ofp, "\n"); fprintf(ofp, " -h, --help Show this help\n"); + fprintf(ofp, " --list-options Simple listing of options\n"); fprintf(ofp, "\n"); } @@ -118,6 +119,10 @@ int cmd_destroy(int argc, const char **argv) case OPT_HELP: usage(stderr); goto end; + case OPT_LIST_OPTIONS: + list_cmd_options(stdout, long_options); + ret = CMD_SUCCESS; + goto end; default: usage(stderr); ret = CMD_UNDEFINED;