Add --list-commands option to the snapshot command
[lttng-tools.git] / src / bin / lttng / commands / snapshot.c
index dd1137baa157c0c051256f4a71934a1de1ba3301..a357730d008444d1d1b1db4ffc36dc40637bd19e 100644 (file)
@@ -50,6 +50,7 @@ enum {
        OPT_HELP = 1,
        OPT_LIST_OPTIONS,
        OPT_MAX_SIZE,
+       OPT_LIST_COMMANDS,
 };
 
 static struct poptOption snapshot_opts[] = {
@@ -61,6 +62,7 @@ static struct poptOption snapshot_opts[] = {
        {"name",         'n', POPT_ARG_STRING, &opt_output_name, 0, 0, 0},
        {"max-size",     'm', POPT_ARG_STRING, 0, OPT_MAX_SIZE, 0, 0},
        {"list-options",   0, POPT_ARG_NONE, NULL, OPT_LIST_OPTIONS, NULL, NULL},
+       {"list-commands",  0, POPT_ARG_NONE, NULL, OPT_LIST_COMMANDS},
        {0, 0, 0, 0, 0, 0, 0}
 };
 
@@ -440,6 +442,9 @@ int cmd_snapshot(int argc, const char **argv)
                case OPT_LIST_OPTIONS:
                        list_cmd_options(stdout, snapshot_opts);
                        goto end;
+               case OPT_LIST_COMMANDS:
+                       list_commands(actions, stdout);
+                       goto end;
                case OPT_MAX_SIZE:
                {
                        uint64_t val;
This page took 0.023475 seconds and 4 git commands to generate.