Change in osmo-trx[master]: 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:19:54 UTC 2018


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


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

Add -V param to print version

Change-Id: I9f2d6c4b1a508aceb1ccc0559f0902eedf2ec5af
---
M Transceiver52M/osmo-trx.cpp
1 file changed, 8 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/37/9637/1

diff --git a/Transceiver52M/osmo-trx.cpp b/Transceiver52M/osmo-trx.cpp
index 09ba14e..1c40fcf 100644
--- a/Transceiver52M/osmo-trx.cpp
+++ b/Transceiver52M/osmo-trx.cpp
@@ -49,6 +49,8 @@
 #include <osmocom/ctrl/ports.h>
 #include <osmocom/ctrl/control_if.h>
 #include <osmocom/vty/stats.h>
+#include <osmocom/vty/command.h>
+
 #include "convolve.h"
 #include "convert.h"
 #include "trx_vty.h"
@@ -194,6 +196,7 @@
 	fprintf(stdout, "Options:\n"
 		"  -h    This text\n"
 		"  -C    Filename The config file to use\n"
+		"  -V    Print the version of OsmoTRX\n"
 		);
 }
 
@@ -211,7 +214,7 @@
 	std::vector<std::string> rx_paths, tx_paths;
 	bool rx_paths_set = false, tx_paths_set = false;
 
-	while ((option = getopt(argc, argv, "ha:l:i:j:p:c:dmxgfo:s:b:r:A:R:Set:y:z:C:")) != -1) {
+	while ((option = getopt(argc, argv, "ha:l:i:j:p:c:dmxgfo:s:b:r:A:R:Set:y:z:C:V")) != -1) {
 		switch (option) {
 		case 'h':
 			print_help();
@@ -311,6 +314,10 @@
 		case 'C':
 			config_file = optarg;
 			break;
+		case 'V':
+			print_version(1);
+			exit(0);
+			break;
 		default:
 			goto bad_config;
 		}

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

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I9f2d6c4b1a508aceb1ccc0559f0902eedf2ec5af
Gerrit-Change-Number: 9637
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/0ef866dd/attachment.htm>


More information about the gerrit-log mailing list