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
/
lttng.c
diff --git
a/src/bin/lttng/lttng.c
b/src/bin/lttng/lttng.c
index b3ee2428640f945d1b4bf68736f1c2a91469edc0..ecfea53ff4b36121c8f56b0747e66298968b57ba 100644
(file)
--- a/
src/bin/lttng/lttng.c
+++ b/
src/bin/lttng/lttng.c
@@
-33,6
+33,14
@@
#include "command.h"
#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;
/* 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 = 0;
goto end;
case 'h':
- ret = utils_show_man_page(1, "lttng");
-
+ ret = utils_show_help(1, "lttng", help_msg);
if (ret) {
if (ret) {
- ERR("Cannot
view man page lttng(1)
");
+ ERR("Cannot
show --help for `lttng`
");
perror("exec");
}
goto end;
perror("exec");
}
goto end;
This page took
0.023817 seconds
and
4
git commands to generate.