Change in osmo-bts[master]: vty: ensure all warning messages are prefixed with '%%'

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

fixeria gerrit-no-reply at lists.osmocom.org
Wed May 19 15:29:59 UTC 2021


fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/24290 )


Change subject: vty: ensure all warning messages are prefixed with '%%'
......................................................................

vty: ensure all warning messages are prefixed with '%%'

Change-Id: I23fc1cd8aa5725de06651f061c9fce6a022adfa8
---
M src/common/vty.c
1 file changed, 13 insertions(+), 13 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/90/24290/1

diff --git a/src/common/vty.c b/src/common/vty.c
index 4bf9761..3aa8712 100644
--- a/src/common/vty.c
+++ b/src/common/vty.c
@@ -94,14 +94,14 @@
 	struct phy_instance *pinst;
 
 	if (!plink) {
-		vty_out(vty, "Cannot find PHY link number %d%s",
+		vty_out(vty, "%% Cannot find PHY link number %d%s",
 			phy_nr, VTY_NEWLINE);
 		return NULL;
 	}
 
 	pinst = phy_instance_by_num(plink, inst_nr);
 	if (!pinst) {
-		vty_out(vty, "Cannot find PHY instance number %d%s",
+		vty_out(vty, "%% Cannot find PHY instance number %d%s",
 			inst_nr, VTY_NEWLINE);
 		return NULL;
 	}
@@ -559,19 +559,19 @@
 	end = atoi(argv[1]);
 
 	if (end < start) {
-		vty_out(vty, "range end port (%u) must be greater than the range start port (%u)!%s",
+		vty_out(vty, "%% Range end port (%u) must be greater than the range start port (%u)!%s",
 			end, start, VTY_NEWLINE);
 		return CMD_WARNING;
 	}
 
 	if (start & 1) {
-		vty_out(vty, "range must begin at an even port number! (%u not even)%s",
+		vty_out(vty, "%% Range must begin at an even port number! (%u is odd)%s",
 			start, VTY_NEWLINE);
 		return CMD_WARNING;
 	}
 
 	if ((end & 1) == 0) {
-		vty_out(vty, "range must end at an odd port number! (%u not odd)%s",
+		vty_out(vty, "%% Range must end at an odd port number! (%u is even)%s",
 			end, VTY_NEWLINE);
 		return CMD_WARNING;
 	}
@@ -952,11 +952,11 @@
 		 * has been ripped out in favour of the common implementation. Configuration files
 		 * may still contain 'dsp', so let's be tolerant and override 'dsp' by 'osmo'. */
 		if (trx->bts->variant == BTS_OSMO_TRX && vty->type == VTY_FILE) {
-			vty_out(vty, "BTS model 'osmo-bts-trx' has no DSP/HW MS Power Control support, "
+			vty_out(vty, "%% BTS model 'osmo-bts-trx' has no DSP/HW MS Power Control support, "
 				     "consider updating your configuration file!%s", VTY_NEWLINE);
 			soft = true; /* override */
 		} else {
-			vty_out(vty, "This BTS model has no DSP/HW MS Power Control support%s", VTY_NEWLINE);
+			vty_out(vty, "%% This BTS model has no DSP/HW MS Power Control support%s", VTY_NEWLINE);
 			return CMD_WARNING;
 		}
 	}
@@ -975,20 +975,20 @@
 	struct phy_instance *pinst;
 
 	if (!plink) {
-		vty_out(vty, "phy%s does not exist%s",
+		vty_out(vty, "%% phy%s does not exist%s",
 			argv[0], VTY_NEWLINE);
 		return CMD_WARNING;
 	}
 
 	pinst = phy_instance_by_num(plink, atoi(argv[1]));
 	if (!pinst) {
-		vty_out(vty, "phy%s instance %s does not exit%s",
+		vty_out(vty, "%% phy%s instance %s does not exit%s",
 			argv[0], argv[1], VTY_NEWLINE);
 		return CMD_WARNING;
 	}
 
 	if (pinst->trx != NULL) {
-		vty_out(vty, "phy%s instance %s is already bound to %s%s",
+		vty_out(vty, "%% phy%s instance %s is already bound to %s%s",
 			argv[0], argv[1], gsm_trx_name(pinst->trx), VTY_NEWLINE);
 		/* Be tolerant in the interactive VTY mode */
 		if (vty->type == VTY_FILE)
@@ -2045,7 +2045,7 @@
 	if (!pinst) {
 		pinst = phy_instance_create(plink, inst_nr);
 		if (!pinst) {
-			vty_out(vty, "Unable to create phy%u instance %u%s",
+			vty_out(vty, "%% Unable to create phy%u instance %u%s",
 				plink->num, inst_nr, VTY_NEWLINE);
 			return CMD_WARNING;
 		}
@@ -2068,7 +2068,7 @@
 
 	pinst = phy_instance_by_num(plink, inst_nr);
 	if (!pinst) {
-		vty_out(vty, "No such instance %u%s", inst_nr, VTY_NEWLINE);
+		vty_out(vty, "%% No such instance %u%s", inst_nr, VTY_NEWLINE);
 		return CMD_WARNING;
 	}
 
@@ -2088,7 +2088,7 @@
 	struct phy_link *plink = vty->index;
 
 	if (plink->state != PHY_LINK_SHUTDOWN) {
-		vty_out(vty, "Cannot change type of active PHY%s", VTY_NEWLINE);
+		vty_out(vty, "%% Cannot change type of active PHY%s", VTY_NEWLINE);
 		return CMD_WARNING;
 	}
 

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/24290
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I23fc1cd8aa5725de06651f061c9fce6a022adfa8
Gerrit-Change-Number: 24290
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210519/25470feb/attachment.htm>


More information about the gerrit-log mailing list