aboutsummaryrefslogtreecommitdiffstats
path: root/src/libbsc/bsc_vty.c
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2018-01-19 00:59:33 +0100
committerNeels Hofmeyr <neels@hofmeyr.de>2018-02-15 15:21:31 +0100
commit9abc652b5e7fe2a84ad8efd8b36c6fb42b9cb316 (patch)
treef43eaaf7a6253f5c57a9c8f86d15015babe0ecbb /src/libbsc/bsc_vty.c
parent91004ab734d87e4ce04e6ffaa9c69387330c703d (diff)
vty: 'show bts': write '(none)' if none are found.
Diffstat (limited to 'src/libbsc/bsc_vty.c')
-rw-r--r--src/libbsc/bsc_vty.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libbsc/bsc_vty.c b/src/libbsc/bsc_vty.c
index f1cbb5402..6415df9c7 100644
--- a/src/libbsc/bsc_vty.c
+++ b/src/libbsc/bsc_vty.c
@@ -169,6 +169,7 @@ static void dump_pchan_load_vty(struct vty *vty, char *prefix,
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 @@ static void dump_pchan_load_vty(struct vty *vty, char *prefix,
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)