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 /lib/vrf.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 'lib/vrf.c')
| -rw-r--r-- | lib/vrf.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -851,14 +851,16 @@ static int vrf_write_host(struct vty *vty) return 1; } +static int vrf_write_host(struct vty *vty); static struct cmd_node vrf_debug_node = { .node = VRF_DEBUG_NODE, .prompt = "", + .config_write = vrf_write_host, }; void vrf_install_commands(void) { - install_node(&vrf_debug_node, vrf_write_host); + install_node(&vrf_debug_node); install_element(CONFIG_NODE, &vrf_debug_cmd); install_element(ENABLE_NODE, &vrf_debug_cmd); @@ -871,7 +873,8 @@ void vrf_cmd_init(int (*writefunc)(struct vty *vty), { install_element(CONFIG_NODE, &vrf_cmd); install_element(CONFIG_NODE, &no_vrf_cmd); - install_node(&vrf_node, writefunc); + vrf_node.config_write = writefunc; + install_node(&vrf_node); install_default(VRF_NODE); install_element(VRF_NODE, &vrf_exit_cmd); if (vrf_is_backend_netns() && ns_have_netns()) { |
