Skip to content

Commit

Permalink
Merge branch 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/…
Browse files Browse the repository at this point in the history
…git/mmarek/kbuild-2.6

* 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6:
  kconfig: fix undesirable side effect of adding "visible" menu attribute
  • Loading branch information
torvalds committed Jan 2, 2011
2 parents 3643e0e + 7ad1227 commit d864b7b
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions scripts/kconfig/menu.c
Expand Up @@ -140,6 +140,20 @@ struct property *menu_add_prop(enum prop_type type, char *prompt, struct expr *e
}
if (current_entry->prompt && current_entry != &rootmenu)
prop_warn(prop, "prompt redefined");

/* Apply all upper menus' visibilities to actual prompts. */
if(type == P_PROMPT) {
struct menu *menu = current_entry;

while ((menu = menu->parent) != NULL) {
if (!menu->visibility)
continue;
prop->visible.expr
= expr_alloc_and(prop->visible.expr,
menu->visibility);
}
}

current_entry->prompt = prop;
}
prop->text = prompt;
Expand Down

0 comments on commit d864b7b

Please sign in to comment.