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/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Fri Jun 15 14:51:00 UTC 2018


Harald Welte has submitted this change and it was merged. ( 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, 8 insertions(+), 1 deletion(-)

Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, approved



diff --git a/src/osmo-bsc/osmo_bsc_main.c b/src/osmo-bsc/osmo_bsc_main.c
index 6967e8c..69db32e 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'},
@@ -116,7 +119,7 @@
 			{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;
@@ -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: merged
Gerrit-Change-Id: I74e0e40ee6b2ce66d76f151528d9a958683944c7
Gerrit-Change-Number: 9639
Gerrit-PatchSet: 2
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180615/5bc9e501/attachment.htm>


More information about the gerrit-log mailing list