From daa4f461ad1019e6430f45df8f840be1c3ddf7ab Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Fri, 15 Jun 2018 16:46:03 +0200 Subject: bsc-sccplite: Add -V param to print version Change-Id: Iad663d36d70196408806de664a39863f4d12238b --- openbsc/src/osmo-bsc/osmo_bsc_main.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'openbsc/src/osmo-bsc') diff --git a/openbsc/src/osmo-bsc/osmo_bsc_main.c b/openbsc/src/osmo-bsc/osmo_bsc_main.c index 022cd3dac..be24cbddb 100644 --- a/openbsc/src/osmo-bsc/osmo_bsc_main.c +++ b/openbsc/src/osmo-bsc/osmo_bsc_main.c @@ -81,6 +81,7 @@ static void print_help() printf(" -d option --debug=DRLL:DCC:DMM:DRR:DRSL:DNM enable debugging\n"); printf(" -s --disable-color\n"); printf(" -T --timestamp. Print a timestamp in the debug output.\n"); + printf(" -V --version. Print the version of OsmoBSC.\n"); printf(" -c --config-file filename The config file to use.\n"); printf(" -l --local=IP. The local address of the MGCP.\n"); printf(" -e --log-level number. Set a global loglevel.\n"); @@ -99,6 +100,7 @@ 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' }, {"local", 1, 0, 'l'}, {"log-level", 1, 0, 'e'}, {"rf-ctl", 1, 0, 'r'}, @@ -106,7 +108,7 @@ static void handle_options(int argc, char **argv) {0, 0, 0, 0} }; - c = getopt_long(argc, argv, "hd:DsTc:e:r:t", + c = getopt_long(argc, argv, "hd:DsTVc:e:r:t", long_options, &option_index); if (c == -1) break; @@ -131,6 +133,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; -- cgit v1.2.3