···422422423423static void conf_choice(struct menu *menu)424424{425425- struct symbol *sym, *def_sym;425425+ struct symbol *def_sym;426426 struct menu *child;427427 bool is_new = false;428428-429429- sym = menu->sym;430428431429 while (1) {432430 int cnt, def;433431434432 printf("%*s%s\n", indent - 1, "", menu_get_prompt(menu));435435- def_sym = sym_get_choice_value(sym);433433+ def_sym = sym_calc_choice(menu);436434 cnt = def = 0;437435 line[0] = 0;438436 for (child = menu->list; child; child = child->next) {
+1-1
scripts/kconfig/gconf.c
···1054105410551055 if (sym_is_choice(sym)) { // parse childs for getting final value10561056 struct menu *child;10571057- struct symbol *def_sym = sym_get_choice_value(sym);10571057+ struct symbol *def_sym = sym_calc_choice(menu);10581058 struct menu *def_menu = NULL;1059105910601060 for (child = menu->list; child; child = child->next) {
+1-2
scripts/kconfig/lkc.h
···110110/* symbol.c */111111void sym_clear_all_valid(void);112112struct symbol *sym_choice_default(struct symbol *sym);113113+struct symbol *sym_calc_choice(struct menu *choice);113114struct property *sym_get_range_prop(struct symbol *sym);114115const char *sym_get_string_default(struct symbol *sym);115116struct symbol *sym_check_deps(struct symbol *sym);···120119{121120 return sym->curr.tri;122121}123123-124124-struct symbol *sym_get_choice_value(struct symbol *sym);125122126123static inline bool sym_is_choice(struct symbol *sym)127124{
+3-3
scripts/kconfig/mconf.c
···514514515515 type = sym_get_type(sym);516516 if (sym_is_choice(sym)) {517517- struct symbol *def_sym = sym_get_choice_value(sym);517517+ struct symbol *def_sym = sym_calc_choice(menu);518518 struct menu *def_menu = NULL;519519520520 child_count++;···600600 struct menu *child;601601 struct symbol *active;602602603603- active = sym_get_choice_value(menu->sym);603603+ active = sym_calc_choice(menu);604604 while (1) {605605 int res;606606 int selected;···619619 item_set_data(child);620620 if (child->sym == active)621621 item_set_selected(1);622622- if (child->sym == sym_get_choice_value(menu->sym))622622+ if (child->sym == sym_calc_choice(menu))623623 item_set_tag('X');624624 }625625 dialog_clear();
+3-3
scripts/kconfig/nconf.c
···815815816816 type = sym_get_type(sym);817817 if (sym_is_choice(sym)) {818818- struct symbol *def_sym = sym_get_choice_value(sym);818818+ struct symbol *def_sym = sym_calc_choice(menu);819819 struct menu *def_menu = NULL;820820821821 child_count++;···12391239 .pattern = "",12401240 };1241124112421242- active = sym_get_choice_value(menu->sym);12421242+ active = sym_calc_choice(menu);12431243 /* this is mostly duplicated from the conf() function. */12441244 while (!global_exit) {12451245 reset_menu();···12481248 if (!show_all_items && !menu_is_visible(child))12491249 continue;1250125012511251- if (child->sym == sym_get_choice_value(menu->sym))12511251+ if (child->sym == sym_calc_choice(menu))12521252 item_make(child, ':', "<X> %s",12531253 menu_get_prompt(child));12541254 else if (child->sym)
+1-8
scripts/kconfig/symbol.c
···288288 *289289 * Return: a chosen symbol290290 */291291-static struct symbol *sym_calc_choice(struct menu *choice)291291+struct symbol *sym_calc_choice(struct menu *choice)292292{293293 struct symbol *res = NULL;294294 struct symbol *sym;···363363 }364364365365 return res;366366-}367367-368368-struct symbol *sym_get_choice_value(struct symbol *sym)369369-{370370- struct menu *menu = list_first_entry(&sym->menus, struct menu, link);371371-372372- return sym_calc_choice(menu);373366}374367375368static void sym_warn_unmet_dep(struct symbol *sym)