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]
Date:   Sun, 18 Jul 2021 18:36:31 +0900
From:   Masahiro Yamada <masahiroy@...nel.org>
To:     Robert Richter <rrichter@....com>
Cc:     Michal Marek <michal.lkml@...kovi.net>,
        Jonathan Corbet <corbet@....net>,
        Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
        "open list:DOCUMENTATION" <linux-doc@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] Documentation/kbuild: Document the kconfig choice default value

On Thu, Jul 15, 2021 at 6:26 PM Robert Richter <rrichter@....com> wrote:
>
> Document how choice defaults are determined:
>
> Default of a choice is its first visible choice element [1]. Choice
> elements do not support default attributes. [2]
>
> [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/scripts/kconfig/symbol.c?h=v5.14-rc1#n245
> [2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/scripts/kconfig/menu.c?h=v5.14-rc1#n494
>
> Signed-off-by: Robert Richter <rrichter@....com>
> ---
>  Documentation/kbuild/kconfig-language.rst | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/Documentation/kbuild/kconfig-language.rst b/Documentation/kbuild/kconfig-language.rst
> index 98c24183d8c3..e4d3463594e1 100644
> --- a/Documentation/kbuild/kconfig-language.rst
> +++ b/Documentation/kbuild/kconfig-language.rst
> @@ -417,6 +417,9 @@ definitions of that choice. If a [symbol] is associated to the choice,
>  then you may define the same choice (i.e. with the same entries) in another
>  place.
>
> +The default value of a choice is set to the first visible choice element.


The default value of a choice is set to the first visible choice element
unless it is explicitly set by the 'default' property.

... is more precise.




> +Choice elements do not support the default attribute like menu entries do.

I doubt this info is useful.
Rather, is it even confusing?


choices support 'default' but
choice elements (i.e. choice values) do not.









> +
>  comment::
>
>         "comment" <prompt>
> --
> 2.29.2
>


-- 
Best Regards
Masahiro Yamada

Powered by blists - more mailing lists