MCPcopy Create free account
hub / github.com/ElementsProject/lightning / parse_configvars

Function parse_configvars

common/configdir.c:188–219  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

186}
187
188static 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
221static void finished_arg(int *argc, char **argv, size_t *idx,
222 bool remove_args)

Callers 3

initial_config_optsFunction · 0.85
parse_configvars_earlyFunction · 0.85
parse_configvars_finalFunction · 0.85

Calls 2

configvar_parseFunction · 0.85
errxFunction · 0.85

Tested by

no test coverage detected