From: wallinux@gmail.com (Anders Wallin)
Subject: [lttng-dev] [PATCH lttng-tools] Add version info to lttng-relayd help
Date: Thu, 20 Oct 2016 07:58:55 +0200 [thread overview]
Message-ID: <20161020055855.28518-1-wallinux@gmail.com> (raw)
lttng-relayd man pages states that the option
-V --version is available, but it it's missing in the code
Signed-off-by: Anders Wallin <wallinux at gmail.com>
---
src/bin/lttng-relayd/main.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/bin/lttng-relayd/main.c b/src/bin/lttng-relayd/main.c
index ea46ec7..9c0e2b1 100644
--- a/src/bin/lttng-relayd/main.c
+++ b/src/bin/lttng-relayd/main.c
@@ -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
next reply other threads:[~2016-10-20 5:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-20 5:58 Anders Wallin [this message]
-- strict thread matches above, loose matches on Subject: below --
2016-10-15 6:38 Anders Wallin
2016-10-19 20:57 ` Jérémie Galarneau
2016-10-20 5:58 ` Anders Wallin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161020055855.28518-1-wallinux@gmail.com \
--to=wallinux@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox