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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAFkk2KQCP-xwaAaA5D0Mse2YiOYwkSpEYSVMrMR8zSBjgmn60Q@mail.gmail.com>
Date:   Wed, 7 Feb 2018 21:28:40 +0100
From:   Ulf Magnusson <ulfalizer@...il.com>
To:     Masahiro Yamada <yamada.masahiro@...ionext.com>
Cc:     Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Nicolas Pitre <nicolas.pitre@...aro.org>,
        "Luis R . Rodriguez" <mcgrof@...e.com>,
        Randy Dunlap <rdunlap@...radead.org>,
        Sam Ravnborg <sam@...nborg.org>,
        Michal Marek <michal.lkml@...kovi.net>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Marc Herbert <marc.herbert@...el.com>
Subject: Re: [PATCH 03/14] kconfig: show '?' prompt even if no help text is available

On Tue, Feb 6, 2018 at 1:34 AM, Masahiro Yamada
<yamada.masahiro@...ionext.com> wrote:
> '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@...ionext.com>
> ---
>
>  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 90a76aa2..d346642 100644
> --- a/scripts/kconfig/conf.c
> +++ b/scripts/kconfig/conf.c
> @@ -201,9 +201,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);
> @@ -305,10 +303,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:
> --
> 2.7.4
>

Reviewed-by: Ulf Magnusson <ulfalizer@...il.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ