Change in osmo-bsc[master]: osmo-bsc: Add -V param to print version

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Pau Espin Pedrol gerrit-no-reply at lists.osmocom.org
Fri Jun 15 13:49:16 UTC 2018


Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/9639


Change subject: osmo-bsc: Add -V param to print version
......................................................................

osmo-bsc: Add -V param to print version

Change-Id: I74e0e40ee6b2ce66d76f151528d9a958683944c7
---
M src/osmo-bsc/osmo_bsc_main.c
1 file changed, 7 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/39/9639/1

diff --git a/src/osmo-bsc/osmo_bsc_main.c b/src/osmo-bsc/osmo_bsc_main.c
index 6967e8c..f21a0ea 100644
--- a/src/osmo-bsc/osmo_bsc_main.c
+++ b/src/osmo-bsc/osmo_bsc_main.c
@@ -45,6 +45,7 @@
 #include <osmocom/vty/telnet_interface.h>
 #include <osmocom/vty/ports.h>
 #include <osmocom/vty/logging.h>
+#include <osmocom/vty/command.h>
 
 #include <osmocom/abis/abis.h>
 #include <osmocom/bsc/abis_om2000.h>
@@ -91,6 +92,7 @@
 	printf("  -d  --debug option 		--debug=DRLL:DMM:DRR:DRSL:DNM enable debugging.\n");
 	printf("  -s --disable-color		Disable coloring log in stderr.\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");
@@ -109,6 +111,7 @@
 			{"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'},
@@ -141,6 +144,10 @@
 		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;

-- 
To view, visit https://gerrit.osmocom.org/9639
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I74e0e40ee6b2ce66d76f151528d9a958683944c7
Gerrit-Change-Number: 9639
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180615/3201b8f3/attachment.htm>


More information about the gerrit-log mailing list