vty: 'show bts': write '(none)' if none are found.
Change-Id: I77039824b85a14b9d7bdfe6d2f717679b6886915
diff --git a/src/libbsc/bsc_vty.c b/src/libbsc/bsc_vty.c
index f1cbb54..6415df9 100644
--- a/src/libbsc/bsc_vty.c
+++ b/src/libbsc/bsc_vty.c
@@ -169,6 +169,7 @@
const struct pchan_load *pl)
{
int i;
+ int dumped = 0;
for (i = 0; i < ARRAY_SIZE(pl->pchan); i++) {
const struct load_counter *lc = &pl->pchan[i];
@@ -182,7 +183,10 @@
vty_out(vty, "%s%20s: %3u%% (%u/%u)%s", prefix,
gsm_pchan_name(i), percent, lc->used, lc->total,
VTY_NEWLINE);
+ dumped ++;
}
+ if (!dumped)
+ vty_out(vty, "%s(none)%s", prefix, VTY_NEWLINE);
}
static void net_dump_vty(struct vty *vty, struct gsm_network *net)