summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2022-10-04 13:30:04 +0200
committerDavid Lamparter <equinox@opensourcerouting.org>2022-10-06 15:34:32 +0200
commit9eebf97e3d3fe8bff0d3c5ecdae39f15bd93f40b (patch)
tree04b57dbd4183fd0f0b415a022e12cb72e29fdf16 /tools
parentlib: remove unused CLI macros (diff)
downloadfrr-9eebf97e3d3fe8bff0d3c5ecdae39f15bd93f40b.tar.xz
frr-9eebf97e3d3fe8bff0d3c5ecdae39f15bd93f40b.zip
lib: make cmd_element->attr a bitmask & clarify
It already "looks" like a bitmask, but we currently can't flag a command both YANG and HIDDEN at the same time. It really should be a bitmask. Also clarify DEPRECATED behaviour (or the absence thereof.) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/permutations.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/permutations.c b/tools/permutations.c
index b280cc15b..a0b041f2f 100644
--- a/tools/permutations.c
+++ b/tools/permutations.c
@@ -80,8 +80,7 @@ void permute(struct graph_node *start)
for (unsigned int i = 0; i < vector_active(start->to); i++) {
struct graph_node *gn = vector_slot(start->to, i);
struct cmd_token *tok = gn->data;
- if (tok->attr == CMD_ATTR_HIDDEN
- || tok->attr == CMD_ATTR_DEPRECATED)
+ if (tok->attr & CMD_ATTR_HIDDEN)
continue;
else if (tok->type == END_TKN || gn == start) {
fprintf(stdout, " ");