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

Function conf_string

util/kconfig/nconf.c:1388–1430  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1386}
1387
1388static void conf_string(struct menu *menu)
1389{
1390 const char *prompt = menu_get_prompt(menu);
1391
1392 while (1) {
1393 int res;
1394 const char *heading;
1395
1396 switch (sym_get_type(menu->sym)) {
1397 case S_INT:
1398 heading = inputbox_instructions_int;
1399 break;
1400 case S_HEX:
1401 heading = inputbox_instructions_hex;
1402 break;
1403 case S_STRING:
1404 heading = inputbox_instructions_string;
1405 break;
1406 default:
1407 heading = "Internal nconf error!";
1408 }
1409 res = dialog_inputbox(main_window,
1410 prompt ? prompt : "Main Menu",
1411 heading,
1412 sym_get_string_value(menu->sym),
1413 &dialog_input_result,
1414 &dialog_input_result_len);
1415 switch (res) {
1416 case 0:
1417 if (sym_set_string_value(menu->sym,
1418 dialog_input_result))
1419 return;
1420 btn_dialog(main_window,
1421 "You have made an invalid entry.", 0);
1422 break;
1423 case 1:
1424 show_help(menu);
1425 break;
1426 case KEY_EXIT:
1427 return;
1428 }
1429 }
1430}
1431
1432static void conf_load(void)
1433{

Callers 1

selected_confFunction · 0.70

Calls 7

menu_get_promptFunction · 0.85
sym_get_typeFunction · 0.85
sym_get_string_valueFunction · 0.85
sym_set_string_valueFunction · 0.85
btn_dialogFunction · 0.85
dialog_inputboxFunction · 0.70
show_helpFunction · 0.70

Tested by

no test coverage detected