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

Function conf_askvalue

util/kconfig/conf.c:317–347  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

315}
316
317static int conf_askvalue(struct symbol *sym, const char *def)
318{
319 if (!sym_has_value(sym))
320 printf("(NEW) ");
321
322 line[0] = '\n';
323 line[1] = 0;
324
325 if (!sym_is_changeable(sym)) {
326 printf("%s\n", def);
327 line[0] = '\n';
328 line[1] = 0;
329 return 0;
330 }
331
332 switch (input_mode) {
333 case oldconfig:
334 case syncconfig:
335 if (sym_has_value(sym)) {
336 printf("%s\n", def);
337 return 0;
338 }
339 /* fall through */
340 default:
341 fflush(stdout);
342 xfgets(line, sizeof(line), stdin);
343 break;
344 }
345
346 return 1;
347}
348
349static int conf_string(struct menu *menu)
350{

Callers 2

conf_stringFunction · 0.85
conf_symFunction · 0.85

Calls 4

sym_has_valueFunction · 0.85
printfFunction · 0.85
sym_is_changeableFunction · 0.85
xfgetsFunction · 0.85

Tested by

no test coverage detected