]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
lldpcli: reuse cmd_restrict_ports() to handle port restriction in "show stats"
authorVincent Bernat <bernat@luffy.cx>
Tue, 16 Apr 2013 21:43:07 +0000 (23:43 +0200)
committerVincent Bernat <bernat@luffy.cx>
Tue, 16 Apr 2013 21:43:07 +0000 (23:43 +0200)
src/client/show.c

index 22f5f365fd8b10c4f7a536c7da42957d531a088d..ff406aaf15a2348d4b11ac5198efda637b4a5d04 100644 (file)
@@ -176,23 +176,6 @@ register_common_commands(struct cmd_node *root)
        cmd_restrict_ports(root);
 }
 
-/**
- * Register sub command ports
- */
-void
-register_ports_command(struct cmd_node *root)
-{
-       /* Some specific port */
-       commands_new(
-               commands_new(root,
-                   "ports",
-                   "Restrict to some ports",
-                   cmd_check_no_env, NULL, "ports"),
-               NULL,
-               "Restrict to neighbors on those ports (comma-separated list)",
-               NULL, cmd_store_env_value_and_pop2, "ports");
-}
-
 /**
  * Register subcommands to `show`
  *
@@ -232,7 +215,7 @@ register_commands_show(struct cmd_node *root)
            "Show stats data",
            NULL, cmd_show_interface_stats, NULL);
 
-       register_ports_command(stats);
+       cmd_restrict_ports(stats);
 
        /* Register "show configuration" and "show running-configuration" */
        commands_new(