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

Function conf_string

util/kconfig/mconf.c:691–729  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

689}
690
691static void conf_string(struct menu *menu)
692{
693 const char *prompt = menu_get_prompt(menu);
694
695 while (1) {
696 int res;
697 const char *heading;
698
699 switch (sym_get_type(menu->sym)) {
700 case S_INT:
701 heading = inputbox_instructions_int;
702 break;
703 case S_HEX:
704 heading = inputbox_instructions_hex;
705 break;
706 case S_STRING:
707 heading = inputbox_instructions_string;
708 break;
709 default:
710 heading = "Internal mconf error!";
711 }
712 dialog_clear();
713 res = dialog_inputbox(prompt ? prompt : "Main Menu",
714 heading, 10, 75,
715 sym_get_string_value(menu->sym));
716 switch (res) {
717 case 0:
718 if (sym_set_string_value(menu->sym, dialog_input_result))
719 return;
720 show_textbox(NULL, "You have made an invalid entry.", 5, 43);
721 break;
722 case 1:
723 show_help(menu);
724 break;
725 case KEY_ESC:
726 return;
727 }
728 }
729}
730
731static void conf_load(void)
732{

Callers 1

confFunction · 0.70

Calls 8

menu_get_promptFunction · 0.85
sym_get_typeFunction · 0.85
dialog_clearFunction · 0.85
sym_get_string_valueFunction · 0.85
sym_set_string_valueFunction · 0.85
show_textboxFunction · 0.85
dialog_inputboxFunction · 0.70
show_helpFunction · 0.70

Tested by

no test coverage detected