diff options
Diffstat (limited to 'vtysh/vtysh.c')
-rw-r--r-- | vtysh/vtysh.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c index f7bfd9e42..70c644247 100644 --- a/vtysh/vtysh.c +++ b/vtysh/vtysh.c @@ -1915,6 +1915,16 @@ static int show_per_daemon(const char *line, const char *headline) return ret; } +DEFUN (vtysh_show_debugging, + vtysh_show_debugging_cmd, + "show debugging", + SHOW_STR + DEBUG_STR) +{ + return show_per_daemon("do show debugging\n", + "Debugging Information for %s:\n"); +} + /* Memory */ DEFUN (vtysh_show_memory, vtysh_show_memory_cmd, @@ -1922,7 +1932,8 @@ DEFUN (vtysh_show_memory, SHOW_STR "Memory statistics\n") { - return show_per_daemon("show memory\n", "Memory statistics for %s:\n"); + return show_per_daemon("show memory\n", + "Memory statistics for %s:\n"); } DEFUN (vtysh_show_modules, @@ -1942,20 +1953,8 @@ DEFUN (vtysh_show_logging, SHOW_STR "Show current logging configuration\n") { - unsigned int i; - int ret = CMD_SUCCESS; - char line[] = "do show logging\n"; - - for (i = 0; i < array_size(vtysh_client); i++) - if (vtysh_client[i].fd >= 0) { - fprintf(stdout, "Logging configuration for %s:\n", - vtysh_client[i].name); - ret = vtysh_client_execute(&vtysh_client[i], line, - stdout); - fprintf(stdout, "\n"); - } - - return ret; + return show_per_daemon("do show logging\n", + "Logging configuration for %s:\n"); } DEFUNSH(VTYSH_ALL, vtysh_log_stdout, vtysh_log_stdout_cmd, "log stdout", @@ -3233,6 +3232,7 @@ void vtysh_init_vty(void) install_element(ENABLE_NODE, &vtysh_start_zsh_cmd); #endif + install_element(VIEW_NODE, &vtysh_show_debugging_cmd); install_element(VIEW_NODE, &vtysh_show_memory_cmd); install_element(VIEW_NODE, &vtysh_show_modules_cmd); |