diff options
Diffstat (limited to 'openbsc/include')
-rw-r--r-- | openbsc/include/openbsc/control_cmd.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/openbsc/include/openbsc/control_cmd.h b/openbsc/include/openbsc/control_cmd.h index 8aede15d..a87c469a 100644 --- a/openbsc/include/openbsc/control_cmd.h +++ b/openbsc/include/openbsc/control_cmd.h @@ -172,6 +172,20 @@ static struct ctrl_cmd_element cmd_##cmdname = { \ .verify = &verify_##cmdname, \ } +#define CTRL_CMD_DEFINE_RO(cmdname, cmdstr) \ +static int get_##cmdname(struct ctrl_cmd *cmd, void *data); \ +static int set_##cmdname(struct ctrl_cmd *cmd, void *data) \ +{ \ + cmd->reply = "Read Only attribute"; \ + return CTRL_CMD_ERROR; \ +} \ +static int verify_##cmdname(struct ctrl_cmd *cmd, const char *value, void *data) \ +{ \ + cmd->reply = "Read Only attribute"; \ + return 1; \ +} \ +CTRL_CMD_DEFINE(cmdname, cmdstr) + struct gsm_network; #endif /* _CONTROL_CMD_H */ |