X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng%2Flttng.c;h=08eea54a63200f953ce6e0046d80ababc324e8c9;hb=979d476d33cfaf3b0a19b802f5f64d5c2649f1d7;hp=b3ee2428640f945d1b4bf68736f1c2a91469edc0;hpb=8c7190b7049112d4a3fb5b9d4f43ab5036a2b2de;p=lttng-tools.git diff --git a/src/bin/lttng/lttng.c b/src/bin/lttng/lttng.c index b3ee24286..08eea54a6 100644 --- a/src/bin/lttng/lttng.c +++ b/src/bin/lttng/lttng.c @@ -32,6 +32,15 @@ #include #include "command.h" +#include "version.h" + +static const char *help_msg = +#ifdef LTTNG_EMBED_HELP +#include +#else +NULL +#endif +; /* Variables */ static char *progname; @@ -76,6 +85,10 @@ static struct cmd_struct commands[] = { { "list", cmd_list}, { "load", cmd_load}, { "metadata", cmd_metadata}, + { "regenerate", cmd_regenerate}, + { "rotate", cmd_rotate}, + { "enable-rotation", cmd_enable_rotation}, + { "disable-rotation", cmd_disable_rotation}, { "save", cmd_save}, { "set-session", cmd_set_session}, { "snapshot", cmd_snapshot}, @@ -84,10 +97,8 @@ static struct cmd_struct commands[] = { { "stop", cmd_stop}, { "track", cmd_track}, { "untrack", cmd_untrack}, - { "help", NULL}, { "version", cmd_version}, { "view", cmd_view}, - { "regenerate", cmd_regenerate}, { NULL, NULL} /* Array closure */ }; @@ -316,10 +327,9 @@ static int parse_args(int argc, char **argv) ret = 0; goto end; case 'h': - ret = utils_show_man_page(1, "lttng"); - + ret = utils_show_help(1, "lttng", help_msg); if (ret) { - ERR("Cannot view man page lttng(1)"); + ERR("Cannot show --help for `lttng`"); perror("exec"); } goto end;