summaryrefslogtreecommitdiff
path: root/lib/command.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2016-03-11 14:27:12 -0500
committerDonald Sharp <sharpd@cumulusnetworks.com>2016-10-07 21:05:06 -0400
commit735e62a0f28b375b184e1bfeb97f7cbe5673a497 (patch)
treecaeebf520687716ae8d0cd5eaf422e8b6a073615 /lib/command.c
parent3c8ab49fd1edd6c3f6f83abd9d4b8ae97c11ecde (diff)
lib: Consolidate VIEW_NODE to be ENABLE_NODE as well
If you are in VIEW_NODE, the command should exist in ENABLE_NODE as well. This is being done to reduce chances of code being added to one but not the other NODE. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'lib/command.c')
-rw-r--r--lib/command.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/command.c b/lib/command.c
index 5ebab1450d..f72733ab27 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -718,6 +718,9 @@ install_element (enum node_type ntype, struct cmd_element *cmd)
vector_set (cnode->cmd_vector, cmd);
if (cmd->tokens == NULL)
cmd->tokens = cmd_parse_format(cmd->string, cmd->doc);
+
+ if (ntype == VIEW_NODE)
+ install_element (ENABLE_NODE, cmd);
}
static const unsigned char itoa64[] =