[PATCH] libosmocore[master]: VTY reference: do not list empty nodes

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Sat Dec 9 05:03:59 UTC 2017


Review at  https://gerrit.osmocom.org/5247

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
---
M src/vty/command.c
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/47/5247/1

diff --git a/src/vty/command.c b/src/vty/command.c
index e5efad2..7395711 100644
--- a/src/vty/command.c
+++ b/src/vty/command.c
@@ -685,6 +685,8 @@
 		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

-- 
To view, visit https://gerrit.osmocom.org/5247
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3bd6883a87b8b893e560ceadfffbf41bc380109c
Gerrit-PatchSet: 1
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>



More information about the gerrit-log mailing list