| 186 | } |
| 187 | |
| 188 | static void parse_configvars(struct configvar **cvs, |
| 189 | bool early, |
| 190 | bool full_knowledge, |
| 191 | bool developer) |
| 192 | { |
| 193 | for (size_t i = 0; i < tal_count(cvs); i++) { |
| 194 | const char *problem; |
| 195 | bool should_know; |
| 196 | |
| 197 | should_know = full_knowledge; |
| 198 | /* We should always know cmdline args in final parse */ |
| 199 | if (!early && cvs[i]->src == CONFIGVAR_CMDLINE) |
| 200 | should_know = true; |
| 201 | |
| 202 | current_cv = cvs[i]; |
| 203 | problem = configvar_parse(cvs[i], |
| 204 | early, |
| 205 | should_know, |
| 206 | developer); |
| 207 | current_cv = NULL; |
| 208 | if (!problem) |
| 209 | continue; |
| 210 | |
| 211 | if (cvs[i]->file) { |
| 212 | errx(opt_exitcode, "Config file %s line %u: %s: %s", |
| 213 | cvs[i]->file, cvs[i]->linenum, |
| 214 | cvs[i]->configline, problem); |
| 215 | } else { |
| 216 | errx(opt_exitcode, "--%s: %s", cvs[i]->configline, problem); |
| 217 | } |
| 218 | } |
| 219 | } |
| 220 | |
| 221 | static void finished_arg(int *argc, char **argv, size_t *idx, |
| 222 | bool remove_args) |
no test coverage detected