]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
lldpcli: ensure optional local port description cannot be repeated
authorVincent Bernat <vincent@bernat.im>
Sun, 29 Mar 2015 16:31:55 +0000 (18:31 +0200)
committerVincent Bernat <vincent@bernat.im>
Sun, 29 Mar 2015 16:31:55 +0000 (18:31 +0200)
Also fix some descriptions (no capitalization).

src/client/conf-lldp.c

index d8ec83828b54f194639bfb8664e6a5353a39aa3c..f6ade7a1c91f660596dfd1b594d195815dcd8281 100644 (file)
@@ -201,15 +201,18 @@ register_commands_configure_lldp(struct cmd_node *configure)
                                commands_new(configure_lldp_portid_type,
                                             b_map->string, "Local",
                                             NULL, NULL, NULL),
-                               NULL, "PortID",
+                               NULL, "Port ID",
                                NULL, cmd_store_env_value, "port-id");
                        commands_new(port_id,
-                               NEWLINE, NULL,
+                               NEWLINE, "Set local port ID",
                                NULL, cmd_portid_type_local,
                                b_map->string);
-                       commands_new(port_id,
-                               NULL, "Port Description",
-                               NULL, cmd_store_env_value_and_pop, "port-descr");
+                       commands_new(
+                               commands_new(port_id,
+                                   NULL, "Port description",
+                                   NULL, cmd_store_env_value, "port-descr"),
+                               NEWLINE, "Set local port ID and description",
+                               NULL, cmd_portid_type_local, NULL);
                } else if (!strcmp(b_map->string, "macaddress")) {
                        commands_new(
                                commands_new(configure_lldp_portid_type,