Fix: define _LGPL_SOURCE in C files
[lttng-tools.git] / src / bin / lttng / commands / load.c
index 150b880c0e833b839ee60b1e0abaeda723677090..708ef0b4d8e6c5c035b8fa6a66ddd1e966c73440 100644 (file)
@@ -16,6 +16,7 @@
  */
 
 #define _GNU_SOURCE
+#define _LGPL_SOURCE
 #include <inttypes.h>
 #include <popt.h>
 #include <stdio.h>
@@ -38,6 +39,7 @@ enum {
        OPT_HELP = 1,
        OPT_ALL,
        OPT_FORCE,
+       OPT_LIST_OPTIONS,
 };
 
 static struct mi_writer *writer;
@@ -48,6 +50,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}
 };
 
@@ -154,6 +157,9 @@ int cmd_load(int argc, const char **argv)
                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;
This page took 0.024324 seconds and 4 git commands to generate.