vty: 'show bts': write '(none)' if none are found.
Change-Id: I77039824b85a14b9d7bdfe6d2f717679b6886915
This commit is contained in:
parent
91004ab734
commit
9abc652b5e
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue