ctrl: Provide a reply in case the range check failed

This commit is contained in:
Holger Hans Peter Freyther 2013-02-22 10:53:29 +01:00
parent d38cf50d0a
commit 70c58ef03b
1 changed files with 1 additions and 0 deletions

View File

@ -110,6 +110,7 @@ static int verify_##cmdname(struct ctrl_cmd *cmd, const char *value, void *_data
if ((tmp >= min)&&(tmp <= max)) { \
return 0; \
} \
cmd->reply = "Input not within the range"; \
return -1; \
} \
static struct ctrl_cmd_element cmd_##cmdname = { \