lkml.org 
[lkml]   [2020]   [Jan]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] menuconfig: restore prompt dependencies in help text
Date
Commit bcdedcc1afd6 ("menuconfig: print more info for symbol without
prompts") moved some code from get_prompt_str to get_symbol_str so that
dependency information for symbols without prompts could be shown.

This code would be better copied rather than moved, as the change had
the side-effect of not showing any extra dependencies that the prompt
might have over the symbol.

Put back a copy of the dependency printing code in get_prompt_str.

The following is an example for NAMESPACES:

Before:
Symbol: NAMESPACES [=y]
Type : bool
Prompt: Namespaces support
Location:
(2) -> General setup
Defined at init/Kconfig:1064
Depends on: MULTIUSER [=y]

After:
Symbol: NAMESPACES [=y]
Type : bool
Prompt: Namespaces support
Visible if: MULTIUSER [=y] && EXPERT [=y]
Location:
(2) -> General setup
Defined at init/Kconfig:1064
Depends on: MULTIUSER [=y]

Fixes: bcdedcc1afd6 ("menuconfig: print more info for symbol without prompts")
Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu>
---
scripts/kconfig/menu.c | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
index d9d16469859a..c323ab4ac7c7 100644
--- a/scripts/kconfig/menu.c
+++ b/scripts/kconfig/menu.c
@@ -706,6 +706,12 @@ static void get_prompt_str(struct gstr *r, struct property *prop,
struct jump_key *jump = NULL;

str_printf(r, "Prompt: %s\n", prop->text);
+ if (!expr_is_yes(prop->visible.expr)) {
+ str_append(r, " Visible if: ");
+ expr_gstr_print(prop->visible.expr, r);
+ str_append(r, "\n");
+ }
+
menu = prop->menu->parent;
for (i = 0; menu != &rootmenu && i < 8; menu = menu->parent) {
bool accessible = menu_is_visible(menu);
--
2.24.1
\
 
 \ /
  Last update: 2020-01-01 21:42    [W:1.998 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site