aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--scripts/kconfig/menu.c27
1 files changed, 20 insertions, 7 deletions
diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
index f3bffa309333..826da662886d 100644
--- a/scripts/kconfig/menu.c
+++ b/scripts/kconfig/menu.c
@@ -515,13 +515,6 @@ static void get_prompt_str(struct gstr *r, struct property *prop,
515 struct jump_key *jump; 515 struct jump_key *jump;
516 516
517 str_printf(r, _("Prompt: %s\n"), _(prop->text)); 517 str_printf(r, _("Prompt: %s\n"), _(prop->text));
518 str_printf(r, _(" Defined at %s:%d\n"), prop->menu->file->name,
519 prop->menu->lineno);
520 if (!expr_is_yes(prop->visible.expr)) {
521 str_append(r, _(" Depends on: "));
522 expr_gstr_print(prop->visible.expr, r);
523 str_append(r, "\n");
524 }
525 menu = prop->menu->parent; 518 menu = prop->menu->parent;
526 for (i = 0; menu != &rootmenu && i < 8; menu = menu->parent) { 519 for (i = 0; menu != &rootmenu && i < 8; menu = menu->parent) {
527 bool accessible = menu_is_visible(menu); 520 bool accessible = menu_is_visible(menu);
@@ -572,6 +565,18 @@ static void get_prompt_str(struct gstr *r, struct property *prop,
572} 565}
573 566
574/* 567/*
568 * get peoperty of type P_SYMBOL
569 */
570static struct property *get_symbol_prop(struct symbol *sym)
571{
572 struct property *prop = NULL;
573
574 for_all_properties(sym, prop, P_SYMBOL)
575 break;
576 return prop;
577}
578
579/*
575 * head is optional and may be NULL 580 * head is optional and may be NULL
576 */ 581 */
577void get_symbol_str(struct gstr *r, struct symbol *sym, 582void get_symbol_str(struct gstr *r, struct symbol *sym,
@@ -595,6 +600,14 @@ void get_symbol_str(struct gstr *r, struct symbol *sym,
595 } 600 }
596 for_all_prompts(sym, prop) 601 for_all_prompts(sym, prop)
597 get_prompt_str(r, prop, head); 602 get_prompt_str(r, prop, head);
603 prop = get_symbol_prop(sym);
604 str_printf(r, _(" Defined at %s:%d\n"), prop->menu->file->name,
605 prop->menu->lineno);
606 if (!expr_is_yes(prop->visible.expr)) {
607 str_append(r, _(" Depends on: "));
608 expr_gstr_print(prop->visible.expr, r);
609 str_append(r, "\n");
610 }
598 hit = false; 611 hit = false;
599 for_all_properties(sym, prop, P_SELECT) { 612 for_all_properties(sym, prop, P_SELECT) {
600 if (!hit) { 613 if (!hit) {