]> git.proxmox.com Git - mirror_frr.git/commitdiff
vtysh: Make show work-queue execute by name
authorStephen Worley <sworley@cumulusnetworks.com>
Thu, 13 Jun 2019 21:31:38 +0000 (17:31 -0400)
committerStephen Worley <sworley@cumulusnetworks.com>
Wed, 19 Jun 2019 21:20:24 +0000 (17:20 -0400)
Update show work-queue to use the execute_name() code
path when dispatching to a specific daemon.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
vtysh/vtysh.c

index 2160e4054e3129b10fd15d3f144de688aaf47cad..56b366f082dcfe3ce79beffc302727ba6e6dc011 100644 (file)
@@ -2307,17 +2307,9 @@ DEFUN (vtysh_show_work_queues_daemon,
        DAEMONS_STR)
 {
        int idx_protocol = 2;
-       unsigned int i;
-       int ret = CMD_SUCCESS;
-
-       for (i = 0; i < array_size(vtysh_client); i++) {
-               if (strmatch(vtysh_client[i].name, argv[idx_protocol]->text))
-                       break;
-       }
 
-       ret = vtysh_client_execute(&vtysh_client[i], "show work-queues\n");
-
-       return ret;
+       return vtysh_client_execute_name(argv[idx_protocol]->text,
+                                        "show work-queues\n");
 }
 
 DEFUNSH(VTYSH_ZEBRA, vtysh_link_params, vtysh_link_params_cmd, "link-params",