pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/34620?usp=email )
Change subject: Drop use of deprectated vty callback is_config_node ......................................................................
Drop use of deprectated vty callback is_config_node
While compiling: vty.c:169:3: warning: 'is_config_node' is deprecated: Implicit parent node tracking has replaced the use of this callback. This callback is no longer called, ever, and can be left NULL. [-Wdeprecated-declarations] .is_config_node = bts_vty_is_config_node, ^
Change-Id: I54c5aa5911611b181f80e76556b150f25dd5b60c --- M include/osmo-bts/vty.h M src/common/vty.c M src/osmo-bts-lc15/misc/lc15bts_mgr_vty.c M src/osmo-bts-oc2g/misc/oc2gbts_mgr_vty.c M src/osmo-bts-sysmo/misc/sysmobts_mgr_vty.c 5 files changed, 16 insertions(+), 88 deletions(-)
Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve osmith: Looks good to me, approved
diff --git a/include/osmo-bts/vty.h b/include/osmo-bts/vty.h index 4716f7c..d326c5c 100644 --- a/include/osmo-bts/vty.h +++ b/include/osmo-bts/vty.h @@ -21,7 +21,6 @@ struct phy_instance *vty_get_phy_instance(struct vty *vty, int phy_nr, int inst_nr);
int bts_vty_go_parent(struct vty *vty); -int bts_vty_is_config_node(struct vty *vty, int node);
int bts_vty_init(void *ctx);
diff --git a/src/common/vty.c b/src/common/vty.c index f14cc92..014042d 100644 --- a/src/common/vty.c +++ b/src/common/vty.c @@ -140,20 +140,6 @@ return vty->node; }
-int bts_vty_is_config_node(struct vty *vty, int node) -{ - switch (node) { - case TRX_NODE: - case BTS_NODE: - case PHY_NODE: - case PHY_INST_NODE: - case OSMUX_NODE: - return 1; - default: - return 0; - } -} - static const char osmobts_copyright[] = "Copyright (C) 2010-2011 by Harald Welte, Andreas Eversberg and On-Waves\r\n" "Copyright (C) 2011-2022 by sysmocom - s.f.m.c. GmbH\r\n" @@ -166,7 +152,6 @@ .version = PACKAGE_VERSION, .copyright = osmobts_copyright, .go_parent_cb = bts_vty_go_parent, - .is_config_node = bts_vty_is_config_node, .usr_attr_desc = { [BTS_VTY_ATTR_NEW_LCHAN] = \ "This command applies for newly created lchans", diff --git a/src/osmo-bts-lc15/misc/lc15bts_mgr_vty.c b/src/osmo-bts-lc15/misc/lc15bts_mgr_vty.c index 424ff18..2cf39de 100644 --- a/src/osmo-bts-lc15/misc/lc15bts_mgr_vty.c +++ b/src/osmo-bts-lc15/misc/lc15bts_mgr_vty.c @@ -89,39 +89,10 @@ return vty->node; }
-static int is_config_node(struct vty *vty, int node) -{ - switch (node) { - case MGR_NODE: - case ACT_NORM_NODE: - case ACT_WARN_NODE: - case ACT_CRIT_NODE: - case LIMIT_SUPPLY_TEMP_NODE: - case LIMIT_SOC_NODE: - case LIMIT_FPGA_NODE: - case LIMIT_RMSDET_NODE: - case LIMIT_OCXO_NODE: - case LIMIT_TX0_TEMP_NODE: - case LIMIT_TX1_TEMP_NODE: - case LIMIT_PA0_TEMP_NODE: - case LIMIT_PA1_TEMP_NODE: - case LIMIT_SUPPLY_VOLT_NODE: - case LIMIT_TX0_VSWR_NODE: - case LIMIT_TX1_VSWR_NODE: - case LIMIT_SUPPLY_PWR_NODE: - case LIMIT_PA0_PWR_NODE: - case LIMIT_PA1_PWR_NODE: - return 1; - default: - return 0; - } -} - static struct vty_app_info vty_info = { .name = "lc15bts-mgr", .version = PACKAGE_VERSION, .go_parent_cb = go_to_parent, - .is_config_node = is_config_node, .copyright = copyright, };
diff --git a/src/osmo-bts-oc2g/misc/oc2gbts_mgr_vty.c b/src/osmo-bts-oc2g/misc/oc2gbts_mgr_vty.c index 27698a7..431227d 100644 --- a/src/osmo-bts-oc2g/misc/oc2gbts_mgr_vty.c +++ b/src/osmo-bts-oc2g/misc/oc2gbts_mgr_vty.c @@ -86,35 +86,10 @@ return vty->node; }
-static int is_config_node(struct vty *vty, int node) -{ - switch (node) { - case MGR_NODE: - case ACT_NORM_NODE: - case ACT_WARN_NODE: - case ACT_CRIT_NODE: - case LIMIT_SUPPLY_TEMP_NODE: - case LIMIT_SOC_NODE: - case LIMIT_FPGA_NODE: - case LIMIT_RMSDET_NODE: - case LIMIT_OCXO_NODE: - case LIMIT_TX_TEMP_NODE: - case LIMIT_PA_TEMP_NODE: - case LIMIT_SUPPLY_VOLT_NODE: - case LIMIT_VSWR_NODE: - case LIMIT_SUPPLY_PWR_NODE: - case LIMIT_PA_PWR_NODE: - return 1; - default: - return 0; - } -} - static struct vty_app_info vty_info = { .name = "oc2gbts-mgr", .version = PACKAGE_VERSION, .go_parent_cb = go_to_parent, - .is_config_node = is_config_node, .copyright = copyright, };
diff --git a/src/osmo-bts-sysmo/misc/sysmobts_mgr_vty.c b/src/osmo-bts-sysmo/misc/sysmobts_mgr_vty.c index fb3987b..54d8d36 100644 --- a/src/osmo-bts-sysmo/misc/sysmobts_mgr_vty.c +++ b/src/osmo-bts-sysmo/misc/sysmobts_mgr_vty.c @@ -69,28 +69,10 @@ return vty->node; }
-static int is_config_node(struct vty *vty, int node) -{ - switch (node) { - case MGR_NODE: - case ACT_NORM_NODE: - case ACT_WARN_NODE: - case ACT_CRIT_NODE: - case LIMIT_RF_NODE: - case LIMIT_DIGITAL_NODE: - case LIMIT_BOARD_NODE: - case LIMIT_PA_NODE: - return 1; - default: - return 0; - } -} - static struct vty_app_info vty_info = { .name = "sysmobts-mgr", .version = PACKAGE_VERSION, .go_parent_cb = go_to_parent, - .is_config_node = is_config_node, .copyright = copyright, };