[MERGED] openbsc[master]: cosmetic: Add commandline option to display 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
Wed Mar 15 13:00:48 UTC 2017


Harald Welte has submitted this change and it was merged.

Change subject: cosmetic: Add commandline option to display version
......................................................................


cosmetic: Add commandline option to display version

The -V option to display the Version and the copyright info
is missing.

Change-Id: I0c848fd42c13f473807caf3478d32c6ce5e43e31
---
M openbsc/src/gprs/sgsn_main.c
1 file changed, 6 insertions(+), 1 deletion(-)

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



diff --git a/openbsc/src/gprs/sgsn_main.c b/openbsc/src/gprs/sgsn_main.c
index 5cdfb31..04f2825 100644
--- a/openbsc/src/gprs/sgsn_main.c
+++ b/openbsc/src/gprs/sgsn_main.c
@@ -195,11 +195,12 @@
 			{"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 @@
 		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/2073
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I0c848fd42c13f473807caf3478d32c6ce5e43e31
Gerrit-PatchSet: 2
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list