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 /pbrd/pbr_vty.c | |
parent | *: remove cmd_node->vtysh (diff) | |
download | frr-612c2c15d86e0e5c7e35f1a9a1491f90f365b93c.tar.xz frr-612c2c15d86e0e5c7e35f1a9a1491f90f365b93c.zip |
*: 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 'pbrd/pbr_vty.c')
-rw-r--r-- | pbrd/pbr_vty.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/pbrd/pbr_vty.c b/pbrd/pbr_vty.c index a60d29e51..2f5d4dcbc 100644 --- a/pbrd/pbr_vty.c +++ b/pbrd/pbr_vty.c @@ -680,6 +680,7 @@ DEFPY (show_pbr_interface, static struct cmd_node debug_node = { .node = DEBUG_NODE, .prompt = "", + .config_write = pbr_debug_config_write, }; DEFPY(debug_pbr, @@ -728,9 +729,11 @@ DEFUN_NOSH(show_debugging_pbr, /* ------------------------------------------------------------------------- */ +static int pbr_interface_config_write(struct vty *vty); static struct cmd_node interface_node = { .node = INTERFACE_NODE, .prompt = "%s(config-if)# ", + .config_write = pbr_interface_config_write, }; static int pbr_interface_config_write(struct vty *vty) @@ -758,10 +761,12 @@ static int pbr_interface_config_write(struct vty *vty) return 1; } +static int pbr_vty_map_config_write(struct vty *vty); /* PBR map node structure. */ static struct cmd_node pbr_map_node = { .node = PBRMAP_NODE, .prompt = "%s(config-pbr-map)# ", + .config_write = pbr_vty_map_config_write, }; static int pbr_vty_map_config_write_sequence(struct vty *vty, @@ -840,15 +845,13 @@ void pbr_vty_init(void) { cmd_variable_handler_register(pbr_map_name); - install_node(&interface_node, - pbr_interface_config_write); + install_node(&interface_node); if_cmd_init(); - install_node(&pbr_map_node, - pbr_vty_map_config_write); + install_node(&pbr_map_node); /* debug */ - install_node(&debug_node, pbr_debug_config_write); + install_node(&debug_node); install_element(VIEW_NODE, &debug_pbr_cmd); install_element(CONFIG_NODE, &debug_pbr_cmd); install_element(VIEW_NODE, &show_debugging_pbr_cmd); |