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 /ripd | |
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 'ripd')
-rw-r--r-- | ripd/rip_debug.c | 4 | ||||
-rw-r--r-- | ripd/rip_interface.c | 4 | ||||
-rw-r--r-- | ripd/ripd.c | 4 |
3 files changed, 9 insertions, 3 deletions
diff --git a/ripd/rip_debug.c b/ripd/rip_debug.c index 72cd0c62f..676fc0cca 100644 --- a/ripd/rip_debug.c +++ b/ripd/rip_debug.c @@ -172,10 +172,12 @@ DEFUN (no_debug_rip_zebra, return CMD_SUCCESS; } +static int config_write_debug(struct vty *vty); /* Debug node. */ static struct cmd_node debug_node = { .node = DEBUG_NODE, .prompt = "", + .config_write = config_write_debug, }; static int config_write_debug(struct vty *vty) @@ -211,7 +213,7 @@ void rip_debug_init(void) rip_debug_packet = 0; rip_debug_zebra = 0; - install_node(&debug_node, config_write_debug); + install_node(&debug_node); install_element(ENABLE_NODE, &show_debugging_rip_cmd); install_element(ENABLE_NODE, &debug_rip_events_cmd); diff --git a/ripd/rip_interface.c b/ripd/rip_interface.c index 10e23787e..87899e468 100644 --- a/ripd/rip_interface.c +++ b/ripd/rip_interface.c @@ -1193,9 +1193,11 @@ int rip_show_network_config(struct vty *vty, struct rip *rip) return 0; } +static int rip_interface_config_write(struct vty *vty); static struct cmd_node interface_node = { .node = INTERFACE_NODE, .prompt = "%s(config-if)# ", + .config_write = rip_interface_config_write, }; void rip_interface_sync(struct interface *ifp) @@ -1237,7 +1239,7 @@ void rip_if_init(void) hook_register_prio(if_del, 0, rip_interface_delete_hook); /* Install interface node. */ - install_node(&interface_node, rip_interface_config_write); + install_node(&interface_node); if_cmd_init(); if_zapi_callbacks(rip_ifp_create, rip_ifp_up, rip_ifp_down, rip_ifp_destroy); diff --git a/ripd/ripd.c b/ripd/ripd.c index 95ea19a98..71511deb1 100644 --- a/ripd/ripd.c +++ b/ripd/ripd.c @@ -3327,10 +3327,12 @@ static int config_write_rip(struct vty *vty) return write; } +static int config_write_rip(struct vty *vty); /* RIP node structure. */ static struct cmd_node rip_node = { .node = RIP_NODE, .prompt = "%s(config-router)# ", + .config_write = config_write_rip, }; /* Distribute-list update functions. */ @@ -3734,7 +3736,7 @@ void rip_vrf_terminate(void) void rip_init(void) { /* Install top nodes. */ - install_node(&rip_node, config_write_rip); + install_node(&rip_node); /* Install rip commands. */ install_element(VIEW_NODE, &show_ip_rip_cmd); |