diff options
| author | David Lamparter <equinox@opensourcerouting.org> | 2018-09-08 22:31:43 +0200 |
|---|---|---|
| committer | David Lamparter <equinox@diac24.net> | 2020-04-16 12:53:00 +0200 |
| commit | 612c2c15d86e0e5c7e35f1a9a1491f90f365b93c (patch) | |
| tree | 5fd4cb67296f7748d26a420ad6357615dcd3b382 /zebra/zebra_vty.c | |
| parent | 249a771b63505b24d2a8c05158d7692384811533 (diff) | |
*: remove second parameter on install_node()
There is really no reason to not put this in the cmd_node.
And while we're add it, rename from pointless ".func" to ".config_write".
[v2: fix forgotten ldpd config_write]
Signed-off-by: David Lamparter <equinox@diac24.net>
Diffstat (limited to 'zebra/zebra_vty.c')
| -rw-r--r-- | zebra/zebra_vty.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c index c3199bcb5e..bb8d0c7744 100644 --- a/zebra/zebra_vty.c +++ b/zebra/zebra_vty.c @@ -3478,30 +3478,38 @@ DEFUN_HIDDEN (show_frr, } /* IP node for static routes. */ +static int zebra_ip_config(struct vty *vty); static struct cmd_node ip_node = { .node = IP_NODE, .prompt = "", + .config_write = zebra_ip_config, }; +static int config_write_protocol(struct vty *vty); static struct cmd_node protocol_node = { .node = PROTOCOL_NODE, .prompt = "", + .config_write = config_write_protocol, }; /* table node for routing tables. */ +static int config_write_table(struct vty *vty); static struct cmd_node table_node = { .node = TABLE_NODE, .prompt = "", + .config_write = config_write_table, }; +static int config_write_forwarding(struct vty *vty); static struct cmd_node forwarding_node = { .node = FORWARDING_NODE, .prompt = "", + .config_write = config_write_forwarding, }; /* Route VTY. */ void zebra_vty_init(void) { /* Install configuration write function. */ - install_node(&table_node, config_write_table); - install_node(&forwarding_node, config_write_forwarding); + install_node(&table_node); + install_node(&forwarding_node); install_element(VIEW_NODE, &show_ip_forwarding_cmd); install_element(CONFIG_NODE, &ip_forwarding_cmd); @@ -3515,8 +3523,8 @@ void zebra_vty_init(void) /* Route-map */ zebra_route_map_init(); - install_node(&ip_node, zebra_ip_config); - install_node(&protocol_node, config_write_protocol); + install_node(&ip_node); + install_node(&protocol_node); install_element(CONFIG_NODE, &allow_external_route_update_cmd); install_element(CONFIG_NODE, &no_allow_external_route_update_cmd); |
