diff options
author | Michal Marek <mmarek@suse.cz> | 2010-12-01 13:13:56 +0100 |
---|---|---|
committer | Michal Marek <mmarek@suse.cz> | 2010-12-01 13:13:56 +0100 |
commit | 307991055b0ce65d53dc1eb501c456c10eb36360 (patch) | |
tree | 71bb9263dc71344e5d7b97ca6d5cf223f1f1a856 /scripts/kconfig/menu.c | |
parent | 1198c6d45a1ef5f4f7fdfbf33ef7d270493ec575 (diff) | |
parent | 9b4320b77bab4031649c484da1c595f39c2e43cd (diff) |
Merge branch 'kconfig_fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-next into kbuild/rc-fixes
Diffstat (limited to 'scripts/kconfig/menu.c')
-rw-r--r-- | scripts/kconfig/menu.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c index 7e83aef42c6..b9d9aa18e6d 100644 --- a/scripts/kconfig/menu.c +++ b/scripts/kconfig/menu.c @@ -152,6 +152,12 @@ struct property *menu_add_prompt(enum prop_type type, char *prompt, struct expr return menu_add_prop(type, prompt, NULL, dep); } +void menu_add_visibility(struct expr *expr) +{ + current_entry->visibility = expr_alloc_and(current_entry->visibility, + expr); +} + void menu_add_expr(enum prop_type type, struct expr *expr, struct expr *dep) { menu_add_prop(type, NULL, expr, dep); @@ -410,6 +416,11 @@ bool menu_is_visible(struct menu *menu) if (!menu->prompt) return false; + if (menu->visibility) { + if (expr_calc_value(menu->visibility) == no) + return no; + } + sym = menu->sym; if (sym) { sym_calc_value(sym); |