diff options
author | David Lamparter <equinox@opensourcerouting.org> | 2018-09-08 22:00:24 +0200 |
---|---|---|
committer | David Lamparter <equinox@diac24.net> | 2020-04-16 12:53:00 +0200 |
commit | 249a771b63505b24d2a8c05158d7692384811533 (patch) | |
tree | 20d587dfca7061a129f479e7a96208453cfc3941 /lib | |
parent | *: clean up cmd_node initializers (diff) | |
download | frr-249a771b63505b24d2a8c05158d7692384811533.tar.xz frr-249a771b63505b24d2a8c05158d7692384811533.zip |
*: remove cmd_node->vtysh
The only nodes that have this as 0 don't have a "->func" anyway, so the
entire thing is really just pointless.
Signed-off-by: David Lamparter <equinox@diac24.net>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/agentx.c | 1 | ||||
-rw-r--r-- | lib/command.c | 4 | ||||
-rw-r--r-- | lib/command.h | 3 | ||||
-rw-r--r-- | lib/filter.c | 3 | ||||
-rw-r--r-- | lib/keychain.c | 2 | ||||
-rw-r--r-- | lib/nexthop_group.c | 1 | ||||
-rw-r--r-- | lib/northbound_cli.c | 1 | ||||
-rw-r--r-- | lib/plist.c | 2 | ||||
-rw-r--r-- | lib/resolver.c | 1 | ||||
-rw-r--r-- | lib/routemap.c | 1 | ||||
-rw-r--r-- | lib/routemap_cli.c | 1 | ||||
-rw-r--r-- | lib/vrf.c | 2 | ||||
-rw-r--r-- | lib/vty.c | 1 |
13 files changed, 1 insertions, 22 deletions
diff --git a/lib/agentx.c b/lib/agentx.c index 0215affd9..8ce154524 100644 --- a/lib/agentx.c +++ b/lib/agentx.c @@ -161,7 +161,6 @@ static void agentx_events_update(void) static struct cmd_node agentx_node = { .node = SMUX_NODE, .prompt = "", - .vtysh = 1, }; /* Logging NetSNMP messages */ diff --git a/lib/command.c b/lib/command.c index 85ccbbf19..a26ec1a26 100644 --- a/lib/command.c +++ b/lib/command.c @@ -203,7 +203,6 @@ static struct cmd_node enable_node = { static struct cmd_node config_node = { .node = CONFIG_NODE, .prompt = "%s(config)# ", - .vtysh = 1, }; static const struct facility_map { @@ -1724,8 +1723,7 @@ static int vty_write_config(struct vty *vty) vty_out(vty, "!\n"); for (i = 0; i < vector_active(cmdvec); i++) - if ((node = vector_slot(cmdvec, i)) && node->func - && (node->vtysh || vty->type != VTY_SHELL)) { + if ((node = vector_slot(cmdvec, i)) && node->func) { if ((*node->func)(vty)) vty_out(vty, "!\n"); } diff --git a/lib/command.h b/lib/command.h index ea8a76a96..06c7ce7b4 100644 --- a/lib/command.h +++ b/lib/command.h @@ -176,9 +176,6 @@ struct cmd_node { /* Prompt character at vty interface. */ const char *prompt; - /* Is this node's configuration goes to vtysh ? */ - int vtysh; - /* Node's configuration write function */ int (*func)(struct vty *); diff --git a/lib/filter.c b/lib/filter.c index 381f9829b..5665dd82b 100644 --- a/lib/filter.c +++ b/lib/filter.c @@ -2815,7 +2815,6 @@ static int config_write_access(struct vty *vty, afi_t afi) static struct cmd_node access_mac_node = { .node = ACCESS_MAC_NODE, .prompt = "", - .vtysh = 1, }; static int config_write_access_mac(struct vty *vty) @@ -2868,7 +2867,6 @@ static void access_list_init_mac(void) static struct cmd_node access_node = { .node = ACCESS_NODE, .prompt = "", - .vtysh = 1, }; static int config_write_access_ipv4(struct vty *vty) @@ -2955,7 +2953,6 @@ static void access_list_init_ipv4(void) static struct cmd_node access_ipv6_node = { .node = ACCESS_IPV6_NODE, .prompt = "", - .vtysh = 1, }; static int config_write_access_ipv6(struct vty *vty) diff --git a/lib/keychain.c b/lib/keychain.c index c0af630c4..c66c1de07 100644 --- a/lib/keychain.c +++ b/lib/keychain.c @@ -962,13 +962,11 @@ DEFUN (no_send_lifetime, static struct cmd_node keychain_node = { .node = KEYCHAIN_NODE, .prompt = "%s(config-keychain)# ", - .vtysh = 1, }; static struct cmd_node keychain_key_node = { .node = KEYCHAIN_KEY_NODE, .prompt = "%s(config-keychain-key)# ", - .vtysh = 1, }; static int keychain_strftime(char *buf, int bufsiz, time_t *time) diff --git a/lib/nexthop_group.c b/lib/nexthop_group.c index 7c7914a72..95087fe30 100644 --- a/lib/nexthop_group.c +++ b/lib/nexthop_group.c @@ -936,7 +936,6 @@ DEFPY(ecmp_nexthops, ecmp_nexthops_cmd, static struct cmd_node nexthop_group_node = { .node = NH_GROUP_NODE, .prompt = "%s(config-nh-group)# ", - .vtysh = 1, }; void nexthop_group_write_nexthop(struct vty *vty, struct nexthop *nh) diff --git a/lib/northbound_cli.c b/lib/northbound_cli.c index 9c001a3b0..5803dbd78 100644 --- a/lib/northbound_cli.c +++ b/lib/northbound_cli.c @@ -1677,7 +1677,6 @@ static struct debug_callbacks nb_dbg_cbs = {.debug_set_all = nb_debug_set_all}; static struct cmd_node nb_debug_node = { .node = NORTHBOUND_DEBUG_NODE, .prompt = "", - .vtysh = 1, }; void nb_cli_install_default(int node) diff --git a/lib/plist.c b/lib/plist.c index 15a79a1cd..8f2389a32 100644 --- a/lib/plist.c +++ b/lib/plist.c @@ -2048,7 +2048,6 @@ static void prefix_list_reset_afi(afi_t afi, int orf) static struct cmd_node prefix_node = { .node = PREFIX_NODE, .prompt = "", - .vtysh = 1, }; static int config_write_prefix_ipv4(struct vty *vty) @@ -2113,7 +2112,6 @@ static void prefix_list_init_ipv4(void) static struct cmd_node prefix_ipv6_node = { .node = PREFIX_IPV6_NODE, .prompt = "", - .vtysh = 1, }; static int config_write_prefix_ipv6(struct vty *vty) diff --git a/lib/resolver.c b/lib/resolver.c index 83e2f5269..9005ee527 100644 --- a/lib/resolver.c +++ b/lib/resolver.c @@ -248,7 +248,6 @@ DEFUN(debug_resolver, static struct cmd_node resolver_debug_node = { .node = RESOLVER_DEBUG_NODE, .prompt = "", - .vtysh = 1, }; static int resolver_config_write_debug(struct vty *vty) diff --git a/lib/routemap.c b/lib/routemap.c index dc73b1e0d..41057c870 100644 --- a/lib/routemap.c +++ b/lib/routemap.c @@ -3018,7 +3018,6 @@ DEFUN (no_debug_rmap, static struct cmd_node rmap_debug_node = { .node = RMAP_DEBUG_NODE, .prompt = "", - .vtysh = 1, }; /* Configuration write function. */ diff --git a/lib/routemap_cli.c b/lib/routemap_cli.c index b7db1d4dd..a53c54291 100644 --- a/lib/routemap_cli.c +++ b/lib/routemap_cli.c @@ -1067,7 +1067,6 @@ static int route_map_config_write(struct vty *vty) static struct cmd_node rmap_node = { .node = RMAP_NODE, .prompt = "%s(config-route-map)# ", - .vtysh = 1, }; static void rmap_autocomplete(vector comps, struct cmd_token *token) @@ -761,7 +761,6 @@ DEFUN (no_vrf, static struct cmd_node vrf_node = { .node = VRF_NODE, .prompt = "%s(config-vrf)# ", - .vtysh = 1, }; DEFUN_NOSH (vrf_netns, @@ -855,7 +854,6 @@ static int vrf_write_host(struct vty *vty) static struct cmd_node vrf_debug_node = { .node = VRF_DEBUG_NODE, .prompt = "", - .vtysh = 1, }; void vrf_install_commands(void) @@ -2992,7 +2992,6 @@ static int vty_config_write(struct vty *vty) struct cmd_node vty_node = { .node = VTY_NODE, .prompt = "%s(config-line)# ", - .vtysh = 1, }; /* Reset all VTY status. */ |