lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200102231402.1052657-1-nivedita@alum.mit.edu>
Date:   Thu,  2 Jan 2020 18:14:02 -0500
From:   Arvind Sankar <nivedita@...m.mit.edu>
To:     Masahiro Yamada <masahiroy@...nel.org>,
        linux-kbuild@...r.kernel.org
Cc:     Al Viro <viro@...iv.linux.org.uk>, Rob Landley <rob@...dley.net>,
        Randy Dunlap <rdunlap@...radead.org>,
        linux-kernel@...r.kernel.org
Subject: [PATCH] kconfig: restore prompt dependencies in help text

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@...m.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..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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ