X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=src%2Fbin%2Flttng%2Fcommands%2Fload.c;h=7a29da52da3ed780dfff56970678a5750bf3f970;hb=4ba92f185fb1d0b112cbc804a261939f5f81dc34;hp=150b880c0e833b839ee60b1e0abaeda723677090;hpb=1734c658bc988376ddf880872e9d37160edea133;p=lttng-tools.git diff --git a/src/bin/lttng/commands/load.c b/src/bin/lttng/commands/load.c index 150b880c0..7a29da52d 100644 --- a/src/bin/lttng/commands/load.c +++ b/src/bin/lttng/commands/load.c @@ -15,7 +15,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#define _GNU_SOURCE +#define _LGPL_SOURCE #include #include #include @@ -24,7 +24,7 @@ #include #include -#include +#include #include "../command.h" @@ -38,6 +38,7 @@ enum { OPT_HELP = 1, OPT_ALL, OPT_FORCE, + OPT_LIST_OPTIONS, }; static struct mi_writer *writer; @@ -48,6 +49,7 @@ static struct poptOption load_opts[] = { {"all", 'a', POPT_ARG_NONE, 0, OPT_ALL, 0, 0}, {"input-path", 'i', POPT_ARG_STRING, &opt_input_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} }; @@ -149,11 +151,14 @@ int cmd_load(int argc, const char **argv) while ((opt = poptGetNextOpt(pc)) != -1) { switch (opt) { case OPT_HELP: - usage(stdout); + SHOW_HELP(); goto end; case OPT_ALL: opt_load_all = 1; break; + case OPT_LIST_OPTIONS: + list_cmd_options(stdout, load_opts); + goto end; case OPT_FORCE: opt_force = 1; break;