From 8ec7f901bb1843b7c29335d5ea0531e7a1527210 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Mon, 22 Oct 2012 19:43:26 +0200 Subject: logging: Make sure to install standard "end" command in VTY node When you are in the config-log VTY node, you expect "end" to work like in any other sub-node of config. --- include/osmocom/vty/command.h | 1 + src/vty/logging_vty.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/include/osmocom/vty/command.h b/include/osmocom/vty/command.h index caafdeb5..8fbb4824 100644 --- a/include/osmocom/vty/command.h +++ b/include/osmocom/vty/command.h @@ -361,6 +361,7 @@ void cmd_init(int); extern struct cmd_element config_exit_cmd; extern struct cmd_element config_help_cmd; extern struct cmd_element config_list_cmd; +extern struct cmd_element config_end_cmd; char *host_config_file(); void host_config_set(const char *); diff --git a/src/vty/logging_vty.c b/src/vty/logging_vty.c index 971ec3b6..d473f129 100644 --- a/src/vty/logging_vty.c +++ b/src/vty/logging_vty.c @@ -592,6 +592,8 @@ void logging_vty_add_cmds(const struct log_info *cat) install_element_ve(&show_logging_vty_cmd); install_node(&cfg_log_node, config_write_log); + install_default(CFG_LOG_NODE); + install_element(CFG_LOG_NODE, &config_end_cmd); install_element(CFG_LOG_NODE, &logging_fltr_all_cmd); install_element(CFG_LOG_NODE, &logging_use_clr_cmd); install_element(CFG_LOG_NODE, &logging_prnt_timestamp_cmd); -- cgit v1.2.3