Skip to contentSkip to conversation

Add version info to lttng-relayd help

PATCH Jérémie Galarneau 1 participant 1 message Nov 8, 2016 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Merged in master, stable-2.9, stable-2.8 and stable-2.7.

Thanks!
Jérémie

Quoted 42 lines · Anders Wallin

lttng-relayd man pages states that the option
-V --version is available, but it it's missing in the code

---
 src/bin/lttng-relayd/main.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
src/bin/lttng-relayd/main.c +5 -2
index ea46ec7..9c0e2b1 100644
@@ -161,10 +161,11 @@ static struct option long_options[] = {
        { "output", 1, 0, 'o', },
        { "verbose", 0, 0, 'v', },
        { "config", 1, 0, 'f' },
+       { "version", 0, 0, 'V' },
        { NULL, 0, 0, 0, },
 };
 
-static const char *config_ignore_options[] = { "help", "config" };
+static const char *config_ignore_options[] = { "help", "config", "version" };
 
 /*
  * Take an option from the getopt output and set it in the right variable to be
@@ -255,6 +256,9 @@ static int set_option(int opt, const char *arg, const char *optname)
                        perror("exec");
                }
                exit(EXIT_FAILURE);
+       case 'V':
+               fprintf(stdout, "%s\n", VERSION);
+               exit(EXIT_SUCCESS);
        case 'o':
                if (lttng_is_setuid_setgid()) {
                        WARN("Getting '%s' argument from setuid/setgid binary refused for security reasons.",
--

2.10.0

_______________________________________________
lttng-dev mailing list
[email protected]
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

Signature · 7 lines
Jérémie Galarneau
EfficiOS Inc.
http://www.efficios.com
_______________________________________________
lttng-dev mailing list
[email protected]
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev