summaryrefslogtreecommitdiff
path: root/lib/command.c
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2016-09-23 20:08:47 +0000
committerQuentin Young <qlyoung@cumulusnetworks.com>2016-09-23 20:08:47 +0000
commitf667a580b74670ceccfcbe33b9f6d76c74265dd6 (patch)
treec679f19fbc4dc25e5ac450a1b2fa2a64006fbf0c /lib/command.c
parent0a3e73dd2723912e14a22b077718e602cbad27c8 (diff)
lib: Implement removed ALIAS into DEFUN
N.B.: some of these are de-facto ALIAS resurrections that are necessary due to some parser limitations; these are marked with ALIAS_FIXME so I can go back and add capability to the parser to handle these special cases. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'lib/command.c')
-rw-r--r--lib/command.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/lib/command.c b/lib/command.c
index 7cc2c3b23b..d3b3f3a2b5 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -952,12 +952,6 @@ DEFUN (disable,
}
/* Down vty node level. */
-/*
- * CHECK ME - The following ALIASes need to be implemented in this DEFUN
- * "quit",
- * "Exit current mode and down to previous mode\n"
- *
- */
DEFUN (config_exit,
config_exit_cmd,
"exit",
@@ -1016,7 +1010,15 @@ DEFUN (config_exit,
return CMD_SUCCESS;
}
-/* quit is alias of exit. */
+/* ALIAS_FIXME */
+DEFUN (config_quit,
+ config_quit_cmd,
+ "quit",
+ "Exit current mode and down to previous mode\n")
+{
+ return config_exit (self, vty, argc, argv);
+}
+
/* End of configuration. */
DEFUN (config_end,
@@ -2143,6 +2145,7 @@ cmd_init (int terminal)
install_element (RESTRICTED_NODE, &config_list_cmd);
install_element (RESTRICTED_NODE, &config_exit_cmd);
+ install_element (RESTRICTED_NODE, &config_quit_cmd);
install_element (RESTRICTED_NODE, &config_help_cmd);
install_element (RESTRICTED_NODE, &config_enable_cmd);
install_element (RESTRICTED_NODE, &config_terminal_length_cmd);