| 209 | } |
| 210 | |
| 211 | static struct command_result *param_opt_config(struct command *cmd, |
| 212 | const char *name, |
| 213 | const char *buffer, |
| 214 | const jsmntok_t *tok, |
| 215 | const struct opt_table **config) |
| 216 | { |
| 217 | const char *name0 = json_strdup(tmpctx, buffer, tok); |
| 218 | *config = opt_find_long(name0, NULL); |
| 219 | if (*config) |
| 220 | return NULL; |
| 221 | |
| 222 | return command_fail_badparam(cmd, name, buffer, tok, |
| 223 | "Unknown config option"); |
| 224 | } |
| 225 | |
| 226 | /* FIXME: This is a hack! Expose somehow in ccan/opt.*/ |
| 227 | /* Returns string after first '-'. */ |
no test coverage detected