aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/vty_interface_cmds.c
diff options
context:
space:
mode:
Diffstat (limited to 'openbsc/src/vty_interface_cmds.c')
-rw-r--r--openbsc/src/vty_interface_cmds.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/openbsc/src/vty_interface_cmds.c b/openbsc/src/vty_interface_cmds.c
index 134a8d3a3..a2d3258c0 100644
--- a/openbsc/src/vty_interface_cmds.c
+++ b/openbsc/src/vty_interface_cmds.c
@@ -120,6 +120,36 @@ gDEFUN(ournode_exit,
return CMD_SUCCESS;
}
+/* End of configuration. */
+gDEFUN(ournode_end,
+ ournode_end_cmd, "end", "End current mode and change to enable mode.")
+{
+ switch (vty->node) {
+ case VIEW_NODE:
+ case ENABLE_NODE:
+ /* Nothing to do. */
+ break;
+ case CONFIG_NODE:
+ case GSMNET_NODE:
+ case BTS_NODE:
+ case TRX_NODE:
+ case TS_NODE:
+ case MGCP_NODE:
+ case GBPROXY_NODE:
+ case SGSN_NODE:
+ case NS_NODE:
+ case VTY_NODE:
+ vty_config_unlock(vty);
+ vty->node = ENABLE_NODE;
+ vty->index = NULL;
+ vty->index_sub = NULL;
+ break;
+ default:
+ break;
+ }
+ return CMD_SUCCESS;
+}
+
DEFUN(enable_logging,
enable_logging_cmd,
"logging enable",