MCPcopy Create free account
hub / github.com/Entware/Entware / conf_reset

Function conf_reset

scripts/config/confdata.c:344–367  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

342}
343
344void conf_reset(int def)
345{
346 struct symbol *sym;
347 int i, def_flags;
348
349 def_flags = SYMBOL_DEF << def;
350 for_all_symbols(i, sym) {
351 sym->flags |= SYMBOL_CHANGED;
352 sym->flags &= ~(def_flags|SYMBOL_VALID);
353 if (sym_is_choice(sym))
354 sym->flags |= def_flags;
355 switch (sym->type) {
356 case S_INT:
357 case S_HEX:
358 case S_STRING:
359 if (sym->def[def].val)
360 free(sym->def[def].val);
361 /* fall through */
362 default:
363 sym->def[def].val = NULL;
364 sym->def[def].tri = no;
365 }
366 }
367}
368
369int conf_read_simple(const char *name, int def)
370{

Callers 3

conf_choiceFunction · 0.85
conf_read_simpleFunction · 0.85
conf_choiceFunction · 0.85

Calls 1

sym_is_choiceFunction · 0.85

Tested by

no test coverage detected