X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng%2Fcommands%2Fhelp.c;h=5db141959d1bd089d7f8a65ea93fc957893464d3;hp=29f56bab1778f3dd38ce5186bc5da6a21b7ebc7e;hb=4fc83d948cea6b10484e65f004a6c167e71ac440;hpb=cf0bcb51ea857687a353d2851e572dba6cc63cb0 diff --git a/src/bin/lttng/commands/help.c b/src/bin/lttng/commands/help.c index 29f56bab1..5db141959 100644 --- a/src/bin/lttng/commands/help.c +++ b/src/bin/lttng/commands/help.c @@ -24,6 +24,22 @@ #include "../command.h" #include +static const char *help_msg = +#ifdef LTTNG_EMBED_HELP +#include +#else +NULL +#endif +; + +static const char *lttng_help_msg = +#ifdef LTTNG_EMBED_HELP +#include +#else +NULL +#endif +; + enum { OPT_HELP = 1, OPT_LIST_OPTIONS, @@ -69,14 +85,14 @@ int cmd_help(int argc, const char **argv, const struct cmd_struct commands[]) if (cmd_name == NULL) { /* Fall back to lttng(1) */ - ret = utils_show_man_page(1, "lttng"); - + ret = utils_show_help(1, "lttng", lttng_help_msg); if (ret) { - ERR("Cannot view man page lttng(1)"); + ERR("Cannot show --help for `lttng`"); perror("exec"); ret = CMD_ERROR; - goto end; } + + goto end; } /* Make sure command name exists */