mirror of https://gerrit.osmocom.org/libosmocore
vty/command.h: document and prettify CMD_ATTR_* flags
Since the CMD_ATTR_* flags are intended to be used in bitwise operations, let's assign them proper values. Adding a new flag (e.g. CMD_ATTR_FOO_BAR) could actually result in assigning 0x03 instead of expected (0x01 << 2). Change-Id: I3b1badef830f7e6436a67673b5709ec33c060c68 Related: OS#3584
This commit is contained in:
parent
369015c535
commit
e65c8bad46
|
@ -132,9 +132,10 @@ struct cmd_node {
|
|||
char name[64];
|
||||
};
|
||||
|
||||
/*! Attributes (flags) for \ref cmd_element */
|
||||
enum {
|
||||
CMD_ATTR_DEPRECATED = 1,
|
||||
CMD_ATTR_HIDDEN,
|
||||
CMD_ATTR_DEPRECATED = (1 << 0),
|
||||
CMD_ATTR_HIDDEN = (1 << 1),
|
||||
};
|
||||
|
||||
/*! Structure of a command element */
|
||||
|
|
Loading…
Reference in New Issue