aboutsummaryrefslogtreecommitdiffstats
path: root/src/common
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2020-06-05 00:14:27 +0700
committerVadim Yanitskiy <vyanitskiy@sysmocom.de>2020-06-05 02:14:48 +0700
commit0a8642ab5cfd74010c0aeecb93524fc3ae7cd43a (patch)
tree96f6f56cdad0a15e6b604a31d4aaf8611c8ea24c /src/common
parent633de1fb889d7c7765413654cacc46cb5f9b10b4 (diff)
vty: cosmetic: make an error message more informative
Diffstat (limited to 'src/common')
-rw-r--r--src/common/vty.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/common/vty.c b/src/common/vty.c
index c2cbeb5f..d94a927f 100644
--- a/src/common/vty.c
+++ b/src/common/vty.c
@@ -414,9 +414,11 @@ DEFUN(cfg_bts_band,
struct gsm_bts *bts = vty->index;
int band = gsm_band_parse(argv[0]);
+ /* This should not happen with the recent versions of libosmovty,
+ * but old versions may pass incomplete choice values like 'GSM9'. */
if (band < 0) {
- vty_out(vty, "%% BAND %d is not a valid GSM band%s",
- band, VTY_NEWLINE);
+ vty_out(vty, "%% BAND '%s' is not a valid GSM band%s",
+ argv[0], VTY_NEWLINE);
return CMD_WARNING;
}