From 6e4cbf5fe44f3687f03995402eddd3d11566d496 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 10 Nov 2024 01:02:54 +0000 Subject: [PATCH] sync to torvalds/linux@de2f378f2b771b39594c04695feee86476743a69 --- .gitpicker.json | 2 +- menu.c | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.gitpicker.json b/.gitpicker.json index 021e2ec..2ded959 100644 --- a/.gitpicker.json +++ b/.gitpicker.json @@ -2,7 +2,7 @@ { "user": "torvalds", "repo": "linux", - "branch": "11066801dd4b7c4d75fce65c812723a80c1481ae", + "branch": "de2f378f2b771b39594c04695feee86476743a69", "data": [ { "root": "scripts/kconfig", diff --git a/menu.c b/menu.c index 85dd3d7..7868c76 100644 --- a/menu.c +++ b/menu.c @@ -533,6 +533,7 @@ bool menu_is_empty(struct menu *menu) bool menu_is_visible(struct menu *menu) { + struct menu *child; struct symbol *sym; tristate visible; @@ -551,7 +552,17 @@ bool menu_is_visible(struct menu *menu) } else visible = menu->prompt->visible.tri = expr_calc_value(menu->prompt->visible.expr); - return visible != no; + if (visible != no) + return true; + + if (!sym || sym_get_tristate_value(menu->sym) == no) + return false; + + for (child = menu->list; child; child = child->next) + if (menu_is_visible(child)) + return true; + + return false; } const char *menu_get_prompt(const struct menu *menu)