kconfig: show '?' prompt even if no help text is available

"Linux Kernel Mailing List" <[email protected]>
Newsgroups gmane.linux.kernel.commits.head
Message-ID <[email protected]>
Web:        https://git.kernel.org/torvalds/c/4f208f392103e8d5bcc7558dba69348b27d8ce42
Commit:     4f208f392103e8d5bcc7558dba69348b27d8ce42
Parent:     cb67ab2cd2b8abd9650292c986c79901e3073a59
Refname:    refs/heads/master
Author:     Masahiro Yamada <[email protected]>
AuthorDate: Tue Feb 6 09:34:43 2018 +0900
Committer:  Masahiro Yamada <[email protected]>
CommitDate: Fri Feb 9 04:10:09 2018 +0900

    kconfig: show '?' prompt even if no help text is available
    
    'make config', 'make oldconfig', etc. always receive '?' as a valid
    input and show useful information even if no help text is available.
    
    ------------------------>8------------------------
    foo (FOO) [N/y] (NEW) ?
    
    There is no help available for this option.
    Symbol: FOO [=n]
    Type  : bool
    Prompt: foo
      Defined at Kconfig:1
    ------------------------>8------------------------
    
    However, '?' is not shown in the prompt if its help text is missing.
    Let's show '?' all the time so that the prompt and the behavior match.
    
    Signed-off-by: Masahiro Yamada <[email protected]>
    Reviewed-by: Ulf Magnusson <[email protected]>
---
 scripts/kconfig/conf.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c
index 307bc3f7b945..fc446acbf6d6 100644
--- a/scripts/kconfig/conf.c
+++ b/scripts/kconfig/conf.c
@@ -199,9 +199,7 @@ static int conf_sym(struct menu *menu)
 			printf("/m");
 		if (oldval != yes && sym_tristate_within_range(sym, yes))
 			printf("/y");
-		if (menu_has_help(menu))
-			printf("/?");
-		printf("] ");
+		printf("/?] ");
 		if (!conf_askvalue(sym, sym_get_string_value(sym)))
 			return 0;
 		strip(line);
@@ -303,10 +301,7 @@ static int conf_choice(struct menu *menu)
 			printf("[1]: 1\n");
 			goto conf_childs;
 		}
-		printf("[1-%d", cnt);
-		if (menu_has_help(menu))
-			printf("?");
-		printf("]: ");
+		printf("[1-%d?]: ", cnt);
 		switch (input_mode) {
 		case oldconfig:
 		case silentoldconfig:
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.