projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add a '--list-options' option to each command.
[lttng-tools.git]
/
src
/
bin
/
lttng
/
lttng.c
diff --git
a/src/bin/lttng/lttng.c
b/src/bin/lttng/lttng.c
index 031b015efba4dd05da900b25a8d0c8ead4dfa7b7..64f3efa446530ed61663c9434eb77251cc923c91 100644
(file)
--- a/
src/bin/lttng/lttng.c
+++ b/
src/bin/lttng/lttng.c
@@
-377,15
+377,19
@@
end:
}
/*
}
/*
- * Check for the "help" option in the argv. If found, return 1 else return 0.
+ * Check args for specific options that *must* not trigger a session daemon
+ * execution.
+ *
+ * Return 1 if match else 0.
*/
*/
-static int check_
help_comma
nd(int argc, char **argv)
+static int check_
args_no_sessio
nd(int argc, char **argv)
{
int i;
for (i = 0; i < argc; i++) {
if ((strncmp(argv[i], "-h", 2) == 0) ||
{
int i;
for (i = 0; i < argc; i++) {
if ((strncmp(argv[i], "-h", 2) == 0) ||
- strncmp(argv[i], "--h", 3) == 0) {
+ strncmp(argv[i], "--h", 3) == 0 ||
+ strncmp(argv[i], "--list-options", 14)) {
return 1;
}
}
return 1;
}
}
@@
-448,7
+452,7
@@
static int parse_args(int argc, char **argv)
}
/* Spawn session daemon if needed */
}
/* Spawn session daemon if needed */
- if (opt_no_sessiond == 0 && check_
help_comma
nd(argc, argv) == 0 &&
+ if (opt_no_sessiond == 0 && check_
args_no_sessio
nd(argc, argv) == 0 &&
(check_sessiond() < 0)) {
goto error;
}
(check_sessiond() < 0)) {
goto error;
}
This page took
0.024207 seconds
and
4
git commands to generate.