aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2018-06-15 16:46:03 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2018-06-15 16:46:03 +0200
commitdaa4f461ad1019e6430f45df8f840be1c3ddf7ab (patch)
tree049cd4da83c0e3d8225ed6b9bf803c77c8c803f5
parent4c54c97ff608559e7ba165a2983cc6b9c1da3586 (diff)
bsc-sccplite: Add -V param to print version
-rw-r--r--openbsc/src/osmo-bsc/osmo_bsc_main.c8
1 files changed, 7 insertions, 1 deletions
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;