Skip to content

Commit

Permalink
kbuild: Fix help text not displayed in choice option.
Browse files Browse the repository at this point in the history
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@st.com>
Reviewed-by: Stuart Menefy <stuart.menefy@st.com>
Reviewed-by: Arnaud Lacombe <lacombar@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Michal Marek <mmarek@suse.cz>
  • Loading branch information
Srinivas Kandagatla authored and Michal Marek committed Aug 8, 2011
1 parent 4920e05 commit 3f198df
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions scripts/kconfig/menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -597,11 +597,10 @@ void menu_get_ext_help(struct menu *menu, struct gstr *help)
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);
}
Expand Down

0 comments on commit 3f198df

Please sign in to comment.