MCPcopy Create free account
hub / github.com/coreboot/coreboot / conf_string

Function conf_string

util/kconfig/conf.c:349–380  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

347}
348
349static int conf_string(struct menu *menu)
350{
351 struct symbol *sym = menu->sym;
352 const char *def;
353
354 while (1) {
355 printf("%*s%s ", indent - 1, "", menu->prompt->text);
356 printf("(%s) ", sym->name);
357 def = sym_get_string_value(sym);
358 if (def)
359 printf("[%s] ", def);
360 if (!conf_askvalue(sym, def))
361 return 0;
362 switch (line[0]) {
363 case '\n':
364 break;
365 case '?':
366 /* print help */
367 if (line[1] == '\n') {
368 print_help(menu);
369 def = NULL;
370 break;
371 }
372 /* fall through */
373 default:
374 line[strlen(line)-1] = 0;
375 def = line;
376 }
377 if (def && sym_set_string_value(sym, def))
378 return 0;
379 }
380}
381
382static int conf_sym(struct menu *menu)
383{

Callers 1

confFunction · 0.70

Calls 6

printfFunction · 0.85
sym_get_string_valueFunction · 0.85
conf_askvalueFunction · 0.85
strlenFunction · 0.85
sym_set_string_valueFunction · 0.85
print_helpFunction · 0.70

Tested by

no test coverage detected