summaryrefslogtreecommitdiff
path: root/lib/command_graph.c
diff options
context:
space:
mode:
authorDonald Sharp <donaldsharp72@gmail.com>2022-10-13 13:47:04 -0400
committerGitHub <noreply@github.com>2022-10-13 13:47:04 -0400
commite3e3d729c42505910e0b396899bfd50e2d7b2404 (patch)
treefa49a9c2839a88ef7ec339b76e0fe99913c818c9 /lib/command_graph.c
parentfd30c2467a9a3afc615923af64f5de91937d268f (diff)
parentd40aee771f40b72356eb57d4c9d7bfc2622d9577 (diff)
Merge pull request #12066 from opensourcerouting/cleanup-cli-xref
*: clean up various CLI-related bits
Diffstat (limited to 'lib/command_graph.c')
-rw-r--r--lib/command_graph.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/command_graph.c b/lib/command_graph.c
index 09d802e796..e940685250 100644
--- a/lib/command_graph.c
+++ b/lib/command_graph.c
@@ -494,9 +494,10 @@ void cmd_graph_node_print_cb(struct graph_node *gn, struct buffer *buf)
snprintf(nbuf, sizeof(nbuf), "<b>%s</b>",
lookup_msg(tokennames, tok->type, NULL));
buffer_putstr(buf, nbuf);
- if (tok->attr == CMD_ATTR_DEPRECATED)
+ if (tok->attr & CMD_ATTR_DEPRECATED)
buffer_putstr(buf, " (d)");
- else if (tok->attr == CMD_ATTR_HIDDEN)
+ /* DEPRECATED implies HIDDEN, don't print both */
+ else if (tok->attr & CMD_ATTR_HIDDEN)
buffer_putstr(buf, " (h)");
if (tok->text) {
if (tok->type == WORD_TKN)