projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add --enable-embedded-help option to embed --help messages in binaries
[lttng-tools.git]
/
src
/
bin
/
lttng-crash
/
lttng-crash.c
diff --git
a/src/bin/lttng-crash/lttng-crash.c
b/src/bin/lttng-crash/lttng-crash.c
index ba28af9afa9003f2f92decb5ade2275634b38a02..53de81bd46b640bb77862d6af48a472217844310 100644
(file)
--- a/
src/bin/lttng-crash/lttng-crash.c
+++ b/
src/bin/lttng-crash/lttng-crash.c
@@
-61,6
+61,14
@@
0xF1 ^ 0xFF, 0x77 ^ 0xFF, 0xBF ^ 0xFF, 0x17 ^ 0xFF, \
}
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.
*/
/*
* 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)
{
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) {
if (ret) {
- ERR("Cannot
view man page lttng-crash(1)
");
+ ERR("Cannot
show --help for `lttng-crash`
");
perror("exec");
exit(EXIT_FAILURE);
}
perror("exec");
exit(EXIT_FAILURE);
}
This page took
0.024228 seconds
and
4
git commands to generate.