diff options
| author | Masahiro Yamada <[email protected]> | 2025-05-27 17:56:15 +0000 |
|---|---|---|
| committer | Masahiro Yamada <[email protected]> | 2025-06-05 20:40:25 +0000 |
| commit | 0f57c75973bedc08a865b06ce1b73ae5b54477c0 (patch) | |
| tree | 849c018176c763b6baefc8795cfba171e47b9151 /scripts/kconfig/expr.h | |
| parent | docs: symbol-namespaces: fix reST warning with literal block (diff) | |
| download | kernel-0f57c75973bedc08a865b06ce1b73ae5b54477c0.tar.gz kernel-0f57c75973bedc08a865b06ce1b73ae5b54477c0.zip | |
kconfig: introduce menu type enum
Currently, menu->prompt->type is checked to distinguish "comment"
(P_COMMENT) and "menu" (P_MENU) entries from regular "config" entries.
This is odd because P_COMMENT and P_MENU are not properties.
This commit introduces menu type enum to distinguish menu types more
naturally.
Signed-off-by: Masahiro Yamada <[email protected]>
Diffstat (limited to 'scripts/kconfig/expr.h')
| -rw-r--r-- | scripts/kconfig/expr.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/kconfig/expr.h b/scripts/kconfig/expr.h index 21578dcd4292..fe2231e0e6a4 100644 --- a/scripts/kconfig/expr.h +++ b/scripts/kconfig/expr.h @@ -205,15 +205,26 @@ struct property { for (st = sym->prop; st; st = st->next) \ if (st->text) +enum menu_type { + M_CHOICE, // "choice" + M_COMMENT, // "comment" + M_IF, // "if" + M_MENU, // "mainmenu", "menu", "menuconfig" + M_NORMAL, // others, i.e., "config" +}; + /* * Represents a node in the menu tree, as seen in e.g. menuconfig (though used * for all front ends). Each symbol, menu, etc. defined in the Kconfig files * gets a node. A symbol defined in multiple locations gets one node at each * location. * + * @type: type of the menu entry * @choice_members: list of choice members with priority. */ struct menu { + enum menu_type type; + /* The next menu node at the same level */ struct menu *next; |
