diff options
author | David Lamparter <equinox@opensourcerouting.org> | 2022-10-04 13:30:04 +0200 |
---|---|---|
committer | David Lamparter <equinox@opensourcerouting.org> | 2022-10-06 15:34:32 +0200 |
commit | 9eebf97e3d3fe8bff0d3c5ecdae39f15bd93f40b (patch) | |
tree | 04b57dbd4183fd0f0b415a022e12cb72e29fdf16 /lib/command.h | |
parent | lib: remove unused CLI macros (diff) | |
download | frr-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 'lib/command.h')
-rw-r--r-- | lib/command.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/command.h b/lib/command.h index fd686af94..46763ed0d 100644 --- a/lib/command.h +++ b/lib/command.h @@ -358,9 +358,13 @@ struct cmd_node { DEFUN_CMD_ELEMENT(funcname, cmdname, cmdstr, helpstr, CMD_ATTR_HIDDEN, \ 0) +/* note: DEPRECATED implies HIDDEN, and other than that there is currently no + * difference. It's purely for expressing intent in the source code - a + * DEPRECATED command is supposed to go away, a HIDDEN one is likely to stay. + */ #define ALIAS_DEPRECATED(funcname, cmdname, cmdstr, helpstr) \ DEFUN_CMD_ELEMENT(funcname, cmdname, cmdstr, helpstr, \ - CMD_ATTR_DEPRECATED, 0) + CMD_ATTR_DEPRECATED | CMD_ATTR_HIDDEN, 0) #define ALIAS_YANG(funcname, cmdname, cmdstr, helpstr) \ DEFUN_CMD_ELEMENT(funcname, cmdname, cmdstr, helpstr, CMD_ATTR_YANG, 0) |