[206/262] kbuild: Fix help text not displayed in choice option.

From: Greg KH
Date: Wed Nov 09 2011 - 22:31:23 EST


3.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Srinivas Kandagatla <srinivas.kandagatla@xxxxxx>

commit 3f198dfee49d2e9c30583c62b0c79286c78c7b44 upstream.

Help text under choice menu is never displayed because it does not have
symbol name associated with it, however many kconfigs have help text
under choice, assuming that it will be displayed when user selects help.
for example in Kconfig if we have:
choice
prompt "Choice"
---help---
HELP TEXT ...

config A
bool "A"

config B
bool "B"

endchoice

Without this patch "HELP TEXT" is not displayed when user selects help
option when "Choice" is highlighted from menuconfig or xconfig or
gconfig.

This patch changes the logic in menu_get_ext_help to display help for
cases which dont have symbol names like choice.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@xxxxxx>
Reviewed-by: Stuart Menefy <stuart.menefy@xxxxxx>
Reviewed-by: Arnaud Lacombe <lacombar@xxxxxxxxx>
Signed-off-by: Michal Marek <mmarek@xxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>

---
scripts/kconfig/menu.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)

--- a/scripts/kconfig/menu.c
+++ b/scripts/kconfig/menu.c
@@ -596,11 +596,10 @@ void menu_get_ext_help(struct menu *menu
struct symbol *sym = menu->sym;

if (menu_has_help(menu)) {
- if (sym->name) {
+ if (sym->name)
str_printf(help, "%s%s:\n\n", CONFIG_, sym->name);
- str_append(help, _(menu_get_help(menu)));
- str_append(help, "\n");
- }
+ str_append(help, _(menu_get_help(menu)));
+ str_append(help, "\n");
} else {
str_append(help, nohelp_text);
}


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/