From f7162771d78efb2d9d81caae0b10801771a39645 Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Sun, 22 Oct 2017 02:31:33 +0200 Subject: 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 --- src/vty/command.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') 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 -- cgit v1.2.3