Convenient wrapper for "paramname: msg: invalid token '.*%s'" */
| 17 | |
| 18 | /* Convenient wrapper for "paramname: msg: invalid token '.*%s'" */ |
| 19 | static inline struct command_result * |
| 20 | command_fail_badparam(struct command *cmd, |
| 21 | const char *paramname, |
| 22 | const char *buffer, |
| 23 | const jsmntok_t *tok, |
| 24 | const char *msg) |
| 25 | { |
| 26 | return command_fail(cmd, JSONRPC2_INVALID_PARAMS, |
| 27 | "%s: %s: invalid token '%.*s'", |
| 28 | paramname, msg, |
| 29 | json_tok_full_len(tok), |
| 30 | json_tok_full(buffer, tok)); |
| 31 | } |
| 32 | |
| 33 | /* Also caller supplied: is this invoked simply to get usage? */ |
| 34 | bool command_usage_only(const struct command *cmd); |
no test coverage detected