X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng%2Fcommands%2Fsave.c;h=43f10dc39131d821acc984e3d75aba777707f602;hp=d90ae06344179d8013e398c59a2a4c57e00049d5;hb=6c1c0768320135c6936c371b09731851b508c023;hpb=1734c658bc988376ddf880872e9d37160edea133 diff --git a/src/bin/lttng/commands/save.c b/src/bin/lttng/commands/save.c index d90ae0634..43f10dc39 100644 --- a/src/bin/lttng/commands/save.c +++ b/src/bin/lttng/commands/save.c @@ -16,6 +16,7 @@ */ #define _GNU_SOURCE +#define _LGPL_SOURCE #include #include #include @@ -36,6 +37,7 @@ enum { OPT_HELP = 1, OPT_ALL, OPT_FORCE, + OPT_LIST_OPTIONS, }; static struct poptOption save_opts[] = { @@ -44,6 +46,7 @@ static struct poptOption save_opts[] = { {"all", 'a', POPT_ARG_NONE, 0, OPT_ALL, 0, 0}, {"output-path", 'o', POPT_ARG_STRING, &opt_output_path, 0, 0, 0}, {"force", 'f', POPT_ARG_NONE, 0, OPT_FORCE, 0, 0}, + {"list-options", 0, POPT_ARG_NONE, NULL, OPT_LIST_OPTIONS, NULL, NULL}, {0, 0, 0, 0, 0, 0, 0} }; @@ -152,6 +155,9 @@ int cmd_save(int argc, const char **argv) case OPT_FORCE: opt_force = 1; break; + case OPT_LIST_OPTIONS: + list_cmd_options(stdout, save_opts); + goto end; default: usage(stderr); ret = CMD_UNDEFINED;