kconfig: show '?' prompt even if no help text is available
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Tue, 6 Feb 2018 00:34:43 +0000 (09:34 +0900)
committerChristian Lamparter <chunkeey@gmail.com>
Sun, 10 Feb 2019 20:56:38 +0000 (21:56 +0100)
'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 <yamada.masahiro@socionext.com>
Reviewed-by: Ulf Magnusson <ulfalizer@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
config/conf.c

index 06ddb0514f141e1a551dab50c4b8744386de5334..51a781ad06a8b7e612b7d10de0ea4f7d4d754c18 100644 (file)
@@ -196,9 +196,7 @@ static int conf_sym(struct menu *menu)
                        printf("/m");
                if (oldval != yes && sym_tristate_within_range(sym, yes))
                        printf("/y");
                        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);
                if (!conf_askvalue(sym, sym_get_string_value(sym)))
                        return 0;
                strip(line);
@@ -300,10 +298,7 @@ static int conf_choice(struct menu *menu)
                        printf("[1]: 1\n");
                        goto conf_childs;
                }
                        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:
                        if (!is_new) {
                switch (input_mode) {
                case oldconfig:
                        if (!is_new) {