Add --enable-embedded-help option to embed --help messages in binaries
[lttng-tools.git] / src / bin / lttng / lttng.c
index b3ee2428640f945d1b4bf68736f1c2a91469edc0..ecfea53ff4b36121c8f56b0747e66298968b57ba 100644 (file)
 
 #include "command.h"
 
+static const char *help_msg =
+#ifdef LTTNG_EMBED_HELP
+#include <lttng.1.h>
+#else
+NULL
+#endif
+;
+
 /* Variables */
 static char *progname;
 int opt_no_sessiond;
@@ -316,10 +324,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;
This page took 0.025079 seconds and 5 git commands to generate.