]> git.proxmox.com Git - mirror_frr.git/commitdiff
vtysh: Convert 'show logging' to use helper function.
authorDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 18 Aug 2017 15:12:31 +0000 (11:12 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Mon, 21 Aug 2017 11:21:50 +0000 (07:21 -0400)
The 'show logging' command was not using the 'show_per_daemon'
function for some reason.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
vtysh/vtysh.c

index f971c171bc328afcc5dfbab5b8bc2c033cf98570..0c3cb27c18ff265e02787c240c69f95f4e40c4a1 100644 (file)
@@ -1941,20 +1941,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",