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
diff --git a/include/osmocom/vty/command.h b/include/osmocom/vty/command.h
index 13d6e89..d63dbde 100644
--- a/include/osmocom/vty/command.h
+++ b/include/osmocom/vty/command.h
@@ -132,9 +132,10 @@
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 */