summaryrefslogtreecommitdiff
path: root/lib/command_match.c
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 /lib/command_match.c
parent53d8bf6d7a233ccc97e0f466374878f2b8e3f657 (diff)
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 'lib/command_match.c')
-rw-r--r--lib/command_match.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/command_match.c b/lib/command_match.c
index f221e0a02c..ce2dbc9528 100644
--- a/lib/command_match.c
+++ b/lib/command_match.c
@@ -395,8 +395,7 @@ enum matcher_rv command_complete(struct graph *graph, vector vline,
for (ALL_LIST_ELEMENTS_RO(current, node, gstack)) {
struct cmd_token *token = gstack[0]->data;
- if (token->attr == CMD_ATTR_HIDDEN
- || token->attr == CMD_ATTR_DEPRECATED)
+ if (token->attr & CMD_ATTR_HIDDEN)
continue;
enum match_type minmatch = min_match_level(token->type);