summaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorCosta Tsaousis (ktsaou) <costa@tsaousis.gr>2017-03-11 11:48:48 +0200
committerCosta Tsaousis (ktsaou) <costa@tsaousis.gr>2017-03-11 11:48:48 +0200
commit0b3b92cdf87f4b8ddeae69a651c24891112171aa (patch)
tree084d26510b20036d05c754ecbe8bd8d7ac034a20 /src/main.c
parent45b53c3f03d3c8434c317c8332cd9220a37c4974 (diff)
added common version options to all C programs; fixes #1927
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 86bd8604be..20722a58f0 100644
--- a/src/main.c
+++ b/src/main.c
@@ -230,6 +230,7 @@ struct option_def options[] = {
{ 't', "The internal clock of netdata.", "seconds", "1"},
{ 'u', "Run as user.", "username", "netdata"},
{ 'v', "Print netdata version and exit.", NULL, NULL},
+ { 'V', "Print netdata version and exit.", NULL, NULL},
{ 'W', "See Advanced options below.", "options", NULL},
};
@@ -614,6 +615,7 @@ int main(int argc, char **argv) {
config_set(CONFIG_SECTION_GLOBAL, "run as user", optarg);
break;
case 'v':
+ case 'V':
printf("%s %s\n", program_name, program_version);
return 0;
case 'W':