summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2017-10-22 02:31:33 +0200
committerHarald Welte <laforge@gnumonks.org>2017-12-10 13:34:35 +0000
commitf7162771d78efb2d9d81caae0b10801771a39645 (patch)
treeb3821599eb54c3dbe09e97a94775319d8f25fc45 /src
parent69054e28adf4c76371b82a34588e07211d264966 (diff)
VTY reference: do not list empty nodes
In 'show online-help' output, don't list nodes that have no commands (the 'Password' node). Change-Id: I3bd6883a87b8b893e560ceadfffbf41bc380109c
Diffstat (limited to 'src')
-rw-r--r--src/vty/command.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/vty/command.c b/src/vty/command.c
index e5efad2e..73957115 100644
--- a/src/vty/command.c
+++ b/src/vty/command.c
@@ -685,6 +685,8 @@ static int vty_dump_nodes(struct vty *vty)
cnode = vector_slot(cmdvec, i);
if (!cnode)
continue;
+ if (vector_active(cnode->cmd_vector) < 1)
+ continue;
/* De-dup node IDs: how many times has this same name been used before? Count the first
* occurence as _1 and omit that first suffix, so that the first occurence is called