• Masahiro Yamada's avatar
    kconfig: remove 'optional' property support · 6a121588
    Masahiro Yamada authored
    The 'choice' statement is primarily used to exclusively select one
    option, but the 'optional' property allows all entries to be disabled.
    
    In the following example, both A and B can be disabled simultaneously:
    
        choice
                prompt "choose A, B, or nothing"
                optional
    
        config A
                bool "A"
    
        config B
                bool "B"
    
        endchoice
    
    You can achieve the equivalent outcome by other means.
    
    A common solution is to add another option to guard the choice block.
    In the following example, you can set ENABLE_A_B_CHOICE=n to disable
    the entire choice block:
    
        choice
                prompt "choose A or B"
                depends on ENABLE_A_B_CHOICE
    
        config A
                bool "A"
    
        config B
                bool "B"
    
        endchoice
    
    Another approach is to insert one more entry:
    
        choice
                prompt "choose A, B, or disable both"
    
        config A
                bool "A"
    
        config B
                bool "B"
    
        config DISABLE_A_AND_B
      ...
    6a121588
oldask0_expected_stdout 267 Bytes