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