From b929b5b445ddbe50147c9cb8145fdb270362856e Mon Sep 17 00:00:00 2001 From: Anders Wallin Date: Thu, 20 Oct 2016 07:58:55 +0200 Subject: [PATCH] Add version info to lttng-relayd help MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Jérémie Galarneau --- 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 9a0c7c2a0..3f8cd1ca6 100644 --- a/src/bin/lttng-relayd/main.c +++ b/src/bin/lttng-relayd/main.c @@ -163,10 +163,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" }; /* * usage function on stderr @@ -271,6 +272,9 @@ static int set_option(int opt, const char *arg, const char *optname) case 'h': usage(); 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.34.1