summaryrefslogtreecommitdiffstats
path: root/include/osmocom/vty
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2018-09-24 12:56:31 +0700
committerVadim Yanitskiy <axilirator@gmail.com>2018-09-24 13:02:07 +0700
commite65c8bad46a190f3de7594d545aa4954ad17b85f (patch)
tree9d07705691e7f93ac80aa6f286927f8d454c484b /include/osmocom/vty
parent369015c53545f2f67d8610e5d821ee75289122e5 (diff)
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
Diffstat (limited to 'include/osmocom/vty')
-rw-r--r--include/osmocom/vty/command.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/osmocom/vty/command.h b/include/osmocom/vty/command.h
index 13d6e89d..d63dbdef 100644
--- a/include/osmocom/vty/command.h
+++ b/include/osmocom/vty/command.h
@@ -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 */