From: Arvind Sankar <nivedita@alum.mit.edu>
To: Masahiro Yamada <masahiroy@kernel.org>, linux-kbuild@vger.kernel.org
Cc: Al Viro <viro@zeniv.linux.org.uk>, Rob Landley <rob@landley.net>,
Randy Dunlap <rdunlap@infradead.org>,
linux-kernel@vger.kernel.org
Subject: [PATCH] kconfig: restore prompt dependencies in help text
Date: Thu, 2 Jan 2020 18:14:02 -0500 [thread overview]
Message-ID: <20200102231402.1052657-1-nivedita@alum.mit.edu> (raw)
In-Reply-To: <0ea3e528-4835-ff9c-f5a2-f711666ba75f@infradead.org>
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
Editable 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>
---
| 6 ++++++
1 file changed, 6 insertions(+)
--git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
index d9d16469859a..6fbbe41302dc 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, " Editable 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
next prev parent reply other threads:[~2020-01-02 23:14 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-31 0:30 Why is CONFIG_VT forced on? Rob Landley
2019-12-31 0:36 ` Randy Dunlap
2019-12-31 0:53 ` Rob Landley
2019-12-31 0:59 ` Randy Dunlap
2019-12-31 1:45 ` Rob Landley
2019-12-31 2:00 ` Randy Dunlap
2019-12-31 2:04 ` Rob Landley
2019-12-31 2:03 ` Randy Dunlap
2019-12-31 2:33 ` Theodore Y. Ts'o
2019-12-31 2:40 ` Al Viro
2019-12-31 2:52 ` Al Viro
2019-12-31 3:27 ` Rob Landley
2019-12-31 3:53 ` Al Viro
2019-12-31 4:18 ` Al Viro
2019-12-31 5:58 ` Al Viro
2020-01-01 20:41 ` [PATCH] menuconfig: restore prompt dependencies in help text Arvind Sankar
2020-01-01 21:04 ` Al Viro
2020-01-01 22:26 ` Arvind Sankar
2020-01-02 16:14 ` Randy Dunlap
2020-01-02 23:14 ` Arvind Sankar [this message]
2020-01-03 2:10 ` [PATCH] kconfig: " Masahiro Yamada
2020-01-03 4:20 ` Arvind Sankar
2019-12-31 1:55 ` Why is CONFIG_VT forced on? Theodore Y. Ts'o
2020-01-04 20:27 ` Enrico Weigelt, metux IT consult
2019-12-31 2:28 ` Al Viro
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200102231402.1052657-1-nivedita@alum.mit.edu \
--to=nivedita@alum.mit.edu \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=rdunlap@infradead.org \
--cc=rob@landley.net \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).