aboutsummaryrefslogtreecommitdiffstats
path: root/include/osmocom/vty/command.h
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-08-02 02:14:07 +0000
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-08-05 04:22:56 +0000
commita9e5252128d1d871739f067fe9b0ca9b9a75a6f7 (patch)
tree7f92975a8ef4883b3ca5891bb2a03582270484ca /include/osmocom/vty/command.h
parentc136da587fc2fafff1f649828eae5c996c345017 (diff)
vty: Change API to have node installation be done by int
We are mixing enums and hope that no short-enums are used. This is leading to a lot compiler warnings generated by clang. Change the API to work with integers. Porting: The go_parent_cb implementations in the applications need to be fixed. The API change leads to a compile time warning. Fixes: abis_om2000_vty.c:46:2: warning: implicit conversion from enumeration type 'enum bsc_vty_node' to different enumeration type 'enum node_type' [-Wenum-conversion] OM2K_NODE, ^~~~~~~~~
Diffstat (limited to 'include/osmocom/vty/command.h')
-rw-r--r--include/osmocom/vty/command.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/osmocom/vty/command.h b/include/osmocom/vty/command.h
index 89dc28fc..4eb519f6 100644
--- a/include/osmocom/vty/command.h
+++ b/include/osmocom/vty/command.h
@@ -92,7 +92,7 @@ enum node_type {
* configuration function pointer . */
struct cmd_node {
/*! \brief Node index */
- enum node_type node;
+ int node;
/*! \brief Prompt character at vty interface. */
const char *prompt;
@@ -334,15 +334,15 @@ struct desc {
/* Prototypes. */
void install_node(struct cmd_node *, int (*)(struct vty *));
-void install_default(enum node_type);
-void install_element(enum node_type, struct cmd_element *);
+void install_default(int node_type);
+void install_element(int node_type, struct cmd_element *);
void install_element_ve(struct cmd_element *cmd);
void sort_node(void);
/* This is similar to install_default() but it also creates
* 'exit' and 'end' commands.
*/
-void vty_install_default(enum node_type);
+void vty_install_default(int node_type);
/* Concatenates argv[shift] through argv[argc-1] into a single NUL-terminated
string with a space between each element (allocated using