提交 3e41ba05 编写于 作者: U Ulf Magnusson 提交者: Masahiro Yamada

kconfig: Document SYMBOL_OPTIONAL logic

Not obvious, especially if you don't already know how choices are
implemented.

No functional changes. Only comments added.
Signed-off-by: NUlf Magnusson <ulfalizer@gmail.com>
Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
上级 eea199b4
......@@ -549,6 +549,15 @@ void menu_finalize(struct menu *parent)
sym->flags |= SYMBOL_WARNED;
}
/*
* For non-optional choices, add a reverse dependency (corresponding to
* a select) of '<visibility> && m'. This prevents the user from
* setting the choice mode to 'n' when the choice is visible.
*
* This would also work for non-choice symbols, but only non-optional
* choices clear SYMBOL_OPTIONAL as of writing. Choices are implemented
* as a type of symbol.
*/
if (sym && !sym_is_optional(sym) && parent->prompt) {
sym->rev_dep.expr = expr_alloc_or(sym->rev_dep.expr,
expr_alloc_and(parent->prompt->visible.expr,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册