Commit 4fa9569b authored by Roman Zippel's avatar Roman Zippel Committed by Paul Mackerras

[PATCH] kconfig check fixes

- fix a problem with a unset menuconfig, during the config check it's possible
  conf selects the wrong parent menu and the result is an endless loop.
- only changable config symbols are relevant during config check,
  otherwise we get another endless loop.
parent 523f88f1
......@@ -456,29 +456,17 @@ static void check_conf(struct menu *menu)
return;
sym = menu->sym;
if (!sym)
goto conf_childs;
if (sym_is_choice(sym)) {
if (!sym_has_value(sym)) {
if (sym) {
if (sym_is_changable(sym) && !sym_has_value(sym)) {
if (!conf_cnt++)
printf("*\n* Restart config...\n*\n");
rootEntry = menu_get_parent_menu(menu);
conf(rootEntry);
}
if (sym_get_tristate_value(sym) != mod)
if (sym_is_choice(sym) && sym_get_tristate_value(sym) != mod)
return;
goto conf_childs;
}
if (!sym_has_value(sym)) {
if (!conf_cnt++)
printf("*\n* Restart config...\n*\n");
rootEntry = menu_get_parent_menu(menu);
conf(rootEntry);
}
conf_childs:
for (child = menu->list; child; child = child->next)
check_conf(child);
}
......
......@@ -283,8 +283,7 @@ struct menu *menu_get_parent_menu(struct menu *menu)
{
enum prop_type type;
while (menu != &rootmenu) {
menu = menu->parent;
for (; menu != &rootmenu; menu = menu->parent) {
type = menu->prompt ? menu->prompt->type : 0;
if (type == P_MENU || type == P_ROOTMENU)
break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment