From 0a8642ab5cfd74010c0aeecb93524fc3ae7cd43a Mon Sep 17 00:00:00 2001 From: Vadim Yanitskiy Date: Fri, 5 Jun 2020 00:14:27 +0700 Subject: vty: cosmetic: make an error message more informative Change-Id: I9aeb1780b6a64f7bec80ecb243bd01b47cf4ef24 --- src/common/vty.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/common/vty.c') 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; } -- cgit v1.2.3