diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2020-04-16 19:24:56 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-04-16 19:24:56 -0400 |
| commit | 2ff99507ad97fed3c2a0910605bd72524f497441 (patch) | |
| tree | bb013e5a0ce2068d41ef6497b66449a4a5921a16 /lib/routemap_cli.c | |
| parent | edf7eff0778fbde82932b11246d41c62773934ac (diff) | |
| parent | d1b221f696b4d3ed3cd7f5b0ae1f19a07f87fd80 (diff) | |
Merge pull request #6135 from opensourcerouting/cli-node-cleanup
*: clean up the mess that is CLI command nodes
Diffstat (limited to 'lib/routemap_cli.c')
| -rw-r--r-- | lib/routemap_cli.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/routemap_cli.c b/lib/routemap_cli.c index 41e8cacd81..2c45f09751 100644 --- a/lib/routemap_cli.c +++ b/lib/routemap_cli.c @@ -1064,7 +1064,14 @@ static int route_map_config_write(struct vty *vty) } /* Route map node structure. */ -static struct cmd_node rmap_node = {RMAP_NODE, "%s(config-route-map)# ", 1}; +static int route_map_config_write(struct vty *vty); +static struct cmd_node rmap_node = { + .name = "routemap", + .node = RMAP_NODE, + .parent_node = CONFIG_NODE, + .prompt = "%s(config-route-map)# ", + .config_write = route_map_config_write, +}; static void rmap_autocomplete(vector comps, struct cmd_token *token) { @@ -1087,7 +1094,7 @@ void route_map_cli_init(void) cmd_variable_handler_register(rmap_var_handlers); /* CLI commands. */ - install_node(&rmap_node, route_map_config_write); + install_node(&rmap_node); install_default(RMAP_NODE); install_element(CONFIG_NODE, &route_map_cmd); install_element(CONFIG_NODE, &no_route_map_cmd); |
