aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorRoman Zippel <zippel@linux-m68k.org>2003-05-23 20:01:25 -0700
committerPaul Mackerras <paulus@samba.org>2003-05-23 20:01:25 -0700
commit4fa9569be8ae9263274b216a6730a92f4a833851 (patch)
tree85aa00491a522d66dd21d63c5f59450c71fadf82 /scripts
parent523f88f11c3cdeecc2abf7ca293f22dca890ed7f (diff)
downloadhistory-4fa9569be8ae9263274b216a6730a92f4a833851.tar.gz
[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.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/kconfig/conf.c18
-rw-r--r--scripts/kconfig/menu.c3
2 files changed, 4 insertions, 17 deletions
diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c
index 1602d5f4ecd45..e06f1d7ba7104 100644
--- a/scripts/kconfig/conf.c
+++ b/scripts/kconfig/conf.c
@@ -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);
}
diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
index 81d764e7230d1..ed911416a054b 100644
--- a/scripts/kconfig/menu.c
+++ b/scripts/kconfig/menu.c
@@ -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;