| 212 | } |
| 213 | |
| 214 | static struct command_result *param_subsystem(struct command *cmd, |
| 215 | const char *name, |
| 216 | const char *buffer, |
| 217 | const jsmntok_t *tok, |
| 218 | enum wait_subsystem **subsystem) |
| 219 | { |
| 220 | for (size_t i = 0; i < ARRAY_SIZE(subsystem_names); i++) { |
| 221 | if (json_tok_streq(buffer, tok, subsystem_names[i])) { |
| 222 | *subsystem = tal(cmd, enum wait_subsystem); |
| 223 | **subsystem = i; |
| 224 | return NULL; |
| 225 | } |
| 226 | } |
| 227 | |
| 228 | return command_fail_badparam(cmd, name, buffer, tok, |
| 229 | "unknown subsystem"); |
| 230 | } |
| 231 | |
| 232 | struct command_result *param_index(struct command *cmd, |
| 233 | const char *name, |
nothing calls this directly
no test coverage detected