Add --enable-embedded-help option to embed --help messages in binaries
[lttng-tools.git] / src / bin / lttng-crash / lttng-crash.c
index 65fca36ae264c2e25f7d0437840a4a8f194f67b7..53de81bd46b640bb77862d6af48a472217844310 100644 (file)
                0xF1 ^ 0xFF, 0x77 ^ 0xFF, 0xBF ^ 0xFF, 0x17 ^ 0xFF,     \
        }
 
+static const char *help_msg =
+#ifdef LTTNG_EMBED_HELP
+#include <lttng-crash.1.h>
+#else
+NULL
+#endif
+;
+
 /*
  * Non-static to ensure the compiler does not optimize away the xor.
  */
@@ -207,10 +215,10 @@ static struct option long_options[] = {
 
 static void usage(void)
 {
-       int ret = utils_show_man_page(1, "lttng-crash");
+       int ret = utils_show_help(1, "lttng-crash", help_msg);
 
        if (ret) {
-               ERR("Cannot view man page lttng-crash(1)");
+               ERR("Cannot show --help for `lttng-crash`");
                perror("exec");
                exit(EXIT_FAILURE);
        }
@@ -1137,7 +1145,7 @@ int delete_dir_recursive(const char *path)
                        ret = delete_dir_recursive(subpath);
                        free(subpath);
                        if (ret) {
-                               /* Error occured, abort traversal. */
+                               /* Error occurred, abort traversal. */
                                goto end;
                        }
                } else if (S_ISREG(st.st_mode)) {
This page took 0.025393 seconds and 5 git commands to generate.