diff options
author | Philipp Maier <pmaier@sysmocom.de> | 2017-03-14 17:32:35 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2017-03-15 13:00:47 +0000 |
commit | 99c9707d1c8261727048ae9b4d2fcb693020f1a7 (patch) | |
tree | b85700398d2b49a65c73069fcc078ac2b8389673 /openbsc/src/gprs | |
parent | 11368118c91eb2a94224d494558b38d05414d3c3 (diff) |
cosmetic: Add commandline option to display version
The -V option to display the Version and the copyright info
is missing.
Change-Id: I0c848fd42c13f473807caf3478d32c6ce5e43e31
Diffstat (limited to 'openbsc/src/gprs')
-rw-r--r-- | openbsc/src/gprs/sgsn_main.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/openbsc/src/gprs/sgsn_main.c b/openbsc/src/gprs/sgsn_main.c index 5cdfb31e4..04f2825f7 100644 --- a/openbsc/src/gprs/sgsn_main.c +++ b/openbsc/src/gprs/sgsn_main.c @@ -195,11 +195,12 @@ static void handle_options(int argc, char **argv) {"config-file", 1, 0, 'c'}, {"disable-color", 0, 0, 's'}, {"timestamp", 0, 0, 'T'}, + { "version", 0, 0, 'V' }, {"log-level", 1, 0, 'e'}, {NULL, 0, 0, 0} }; - c = getopt_long(argc, argv, "hd:Dc:sTe:", + c = getopt_long(argc, argv, "hd:Dc:sTVe:", long_options, &option_index); if (c == -1) break; @@ -224,6 +225,10 @@ static void handle_options(int argc, char **argv) case 'T': log_set_print_timestamp(osmo_stderr_target, 1); break; + case 'V': + print_version(1); + exit(0); + break; case 'e': log_set_log_level(osmo_stderr_target, atoi(optarg)); break; |