summaryrefslogtreecommitdiff
path: root/lib/command.c
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2016-12-16 08:11:37 +0100
committerDavid Lamparter <equinox@opensourcerouting.org>2017-01-23 21:52:44 +0100
commitaf2567b646a9bdf22c3f47caeedc8f2de1dac81c (patch)
tree776cfcdf2ed5be4069bec6bff51aa6f428c026d9 /lib/command.c
parent818a5168a1c141beaa63fe887d195123a23a012e (diff)
grammar_sandbox: add into daemons if DEV_BUILD
Also adds "grammar access <node>" to test/dump an existing command node (e.g. BGP_NODE). Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'lib/command.c')
-rw-r--r--lib/command.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/command.c b/lib/command.c
index cb1f54fbbd..6fad28ce6c 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -523,7 +523,7 @@ compare_completions (const void *fst, const void *snd)
* @param completions linked list of cmd_token
* @return deduplicated and sorted vector with
*/
-static vector
+vector
completions_to_vec (struct list *completions)
{
vector comps = vector_init (VECTOR_MIN_SIZE);
@@ -2398,6 +2398,10 @@ cmd_init (int terminal)
vrf_install_commands ();
}
srandom(time(NULL));
+
+#ifdef DEV_BUILD
+ grammar_sandbox_init();
+#endif
}
struct cmd_token *