aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/kconfig/expr.h40
1 files changed, 30 insertions, 10 deletions
diff --git a/scripts/kconfig/expr.h b/scripts/kconfig/expr.h
index 0bdb58eda0cb..6408fefae083 100644
--- a/scripts/kconfig/expr.h
+++ b/scripts/kconfig/expr.h
@@ -111,21 +111,41 @@ struct symbol {
111#define SYMBOL_HASHSIZE 257 111#define SYMBOL_HASHSIZE 257
112#define SYMBOL_HASHMASK 0xff 112#define SYMBOL_HASHMASK 0xff
113 113
114/* A property represent the config options that can be associated
115 * with a config "symbol".
116 * Sample:
117 * config FOO
118 * default y
119 * prompt "foo prompt"
120 * select BAR
121 * config BAZ
122 * int "BAZ Value"
123 * range 1..255
124 */
114enum prop_type { 125enum prop_type {
115 P_UNKNOWN, P_PROMPT, P_COMMENT, P_MENU, P_DEFAULT, P_CHOICE, 126 P_UNKNOWN,
116 P_SELECT, P_RANGE, P_ENV 127 P_PROMPT, /* prompt "foo prompt" or "BAZ Value" */
128 P_COMMENT, /* text associated with a comment */
129 P_MENU, /* prompt associated with a menuconfig option */
130 P_DEFAULT, /* default y */
131 P_CHOICE, /* choice value */
132 P_SELECT, /* select BAR */
133 P_RANGE, /* range 7..100 (for a symbol) */
134 P_ENV, /* value from environment variable */
117}; 135};
118 136
119struct property { 137struct property {
120 struct property *next; 138 struct property *next; /* next property - null if last */
121 struct symbol *sym; 139 struct symbol *sym; /* the symbol for which the property is associated */
122 enum prop_type type; 140 enum prop_type type; /* type of property */
123 const char *text; 141 const char *text; /* the prompt value - P_PROMPT, P_MENU, P_COMMENT */
124 struct expr_value visible; 142 struct expr_value visible;
125 struct expr *expr; 143 struct expr *expr; /* the optional conditional part of the property */
126 struct menu *menu; 144 struct menu *menu; /* the menu the property are associated with
127 struct file *file; 145 * valid for: P_SELECT, P_RANGE, P_CHOICE,
128 int lineno; 146 * P_PROMPT, P_DEFAULT, P_MENU, P_COMMENT */
147 struct file *file; /* what file was this property defined */
148 int lineno; /* what lineno was this property defined */
129}; 149};
130 150
131#define for_all_properties(sym, st, tok) \ 151#define for_all_properties(sym, st, tok) \