Harald Welte has submitted this change and it was merged.

Change subject: vty: display bts features in vty command show bts
......................................................................


vty: display bts features in vty command show bts

The VTY command show bts does not display the bts specific
features yet.

- Also display the feature list in snow-bts

Change-Id: I509f2a7bbfa96c70bdfea4ff2488ee371e914620
---
M src/common/vty.c
1 file changed, 20 insertions(+), 0 deletions(-)

Approvals:
  Vadim Yanitskiy: Looks good to me, but someone else must approve
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/common/vty.c b/src/common/vty.c
index 5abc90e..55c1e0f 100644
--- a/src/common/vty.c
+++ b/src/common/vty.c
@@ -736,6 +736,24 @@
        return len;
 }
 
+static void bts_dump_vty_features(struct vty *vty, struct gsm_bts *bts)
+{
+       unsigned int i;
+       bool no_features = true;
+       vty_out(vty, "  Features:%s", VTY_NEWLINE);
+
+       for (i = 0; i < _NUM_BTS_FEAT; i++) {
+               if (gsm_bts_has_feature(bts, i)) {
+                       vty_out(vty, "    %03u ", i);
+                       vty_out(vty, "%-40s%s", 
get_value_string(gsm_bts_features_descs, i), VTY_NEWLINE);
+                       no_features = false;
+               }
+       }
+
+       if (no_features)
+               vty_out(vty, "    (not available)%s", VTY_NEWLINE);
+}
+
 static void bts_dump_vty(struct vty *vty, struct gsm_bts *bts)
 {
        struct gsm_bts_role_bts *btsb = bts->role;
@@ -788,6 +806,8 @@
                        vty_out(vty, "%s", VTY_NEWLINE);
                }
        }
+
+       bts_dump_vty_features(vty, bts);
 }
 
 

-- 
To view, visit https://gerrit.osmocom.org/6643
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I509f2a7bbfa96c70bdfea4ff2488ee371e914620
Gerrit-PatchSet: 2
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: dexter <pma...@sysmocom.de>
Gerrit-Reviewer: Harald Welte <lafo...@gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Vadim Yanitskiy <axilira...@gmail.com>

Reply via email to