aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/kconfig/menu.c
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/kconfig/menu.c')
-rw-r--r--scripts/kconfig/menu.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
index fd3f0180e08f..7e233a6ca64e 100644
--- a/scripts/kconfig/menu.c
+++ b/scripts/kconfig/menu.c
@@ -443,6 +443,22 @@ bool menu_has_prompt(struct menu *menu)
443 return true; 443 return true;
444} 444}
445 445
446/*
447 * Determine if a menu is empty.
448 * A menu is considered empty if it contains no or only
449 * invisible entries.
450 */
451bool menu_is_empty(struct menu *menu)
452{
453 struct menu *child;
454
455 for (child = menu->list; child; child = child->next) {
456 if (menu_is_visible(child))
457 return(false);
458 }
459 return(true);
460}
461
446bool menu_is_visible(struct menu *menu) 462bool menu_is_visible(struct menu *menu)
447{ 463{
448 struct menu *child; 464 struct menu *child;