summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2012-10-22 19:43:26 +0200
committerHarald Welte <laforge@gnumonks.org>2012-10-22 19:43:26 +0200
commit8ec7f901bb1843b7c29335d5ea0531e7a1527210 (patch)
tree5996146c0e869fd883158cb1872f7a8aea54186c
parent2da47f1d6bf4b335c26d96f082d0a48a5cf7f8e6 (diff)
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.
-rw-r--r--include/osmocom/vty/command.h1
-rw-r--r--src/vty/logging_vty.c2
2 files changed, 3 insertions, 0 deletions
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);