diff options
author | Uwe Hermann <uwe@hermann-uwe.de> | 2008-08-08 07:56:07 +0000 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2008-08-08 07:56:07 +0000 |
commit | e55b32ab627bac2108efb4a3d5b924e00ff60af9 (patch) | |
tree | cd42e58d2102370e476ddff38a4b61b3d7556601 /payloads/libpayload/util/kconfig/expr.h | |
parent | dc93affe72b4e3162fde653da5c0ea0c84bd5e39 (diff) | |
download | coreboot-e55b32ab627bac2108efb4a3d5b924e00ff60af9.tar.xz |
Update the kconfig copy in libpayload to a much more recent one. Among
other things this supposedly also fixes a number of build issues on Mac OS X.
This is more or less the same version (i.e. equally recent) as we have in
coreinfo and buildrom now.
This patch also includes the libintl.h fix from r3475 (coreinfo).
Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3482 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'payloads/libpayload/util/kconfig/expr.h')
-rw-r--r-- | payloads/libpayload/util/kconfig/expr.h | 40 |
1 files changed, 24 insertions, 16 deletions
diff --git a/payloads/libpayload/util/kconfig/expr.h b/payloads/libpayload/util/kconfig/expr.h index 1b36ef18c4..9d4cba1c00 100644 --- a/payloads/libpayload/util/kconfig/expr.h +++ b/payloads/libpayload/util/kconfig/expr.h @@ -25,14 +25,13 @@ struct file { #define FILE_BUSY 0x0001 #define FILE_SCANNED 0x0002 -#define FILE_PRINTED 0x0004 typedef enum tristate { no, mod, yes } tristate; enum expr_type { - E_NONE, E_OR, E_AND, E_NOT, E_EQUAL, E_UNEQUAL, E_CHOICE, E_SYMBOL, E_RANGE + E_NONE, E_OR, E_AND, E_NOT, E_EQUAL, E_UNEQUAL, E_LIST, E_SYMBOL, E_RANGE }; union expr_data { @@ -45,9 +44,12 @@ struct expr { union expr_data left, right; }; -#define E_OR(dep1, dep2) (((dep1)>(dep2))?(dep1):(dep2)) -#define E_AND(dep1, dep2) (((dep1)<(dep2))?(dep1):(dep2)) -#define E_NOT(dep) (2-(dep)) +#define EXPR_OR(dep1, dep2) (((dep1)>(dep2))?(dep1):(dep2)) +#define EXPR_AND(dep1, dep2) (((dep1)<(dep2))?(dep1):(dep2)) +#define EXPR_NOT(dep) (2-(dep)) + +#define expr_list_for_each_sym(l, e, s) \ + for (e = (l); e && (s = e->right.sym); e = e->left.expr) struct expr_value { struct expr *expr; @@ -63,44 +65,49 @@ enum symbol_type { S_UNKNOWN, S_BOOLEAN, S_TRISTATE, S_INT, S_HEX, S_STRING, S_OTHER }; +enum { + S_DEF_USER, /* main user value */ + S_DEF_AUTO, +}; + struct symbol { struct symbol *next; char *name; - char *help; enum symbol_type type; - struct symbol_value curr, user; + struct symbol_value curr; + struct symbol_value def[4]; tristate visible; int flags; struct property *prop; - struct expr *dep, *dep2; struct expr_value rev_dep; }; #define for_all_symbols(i, sym) for (i = 0; i < 257; i++) for (sym = symbol_hash[i]; sym; sym = sym->next) if (sym->type != S_OTHER) -#define SYMBOL_YES 0x0001 -#define SYMBOL_MOD 0x0002 -#define SYMBOL_NO 0x0004 -#define SYMBOL_CONST 0x0007 +#define SYMBOL_CONST 0x0001 #define SYMBOL_CHECK 0x0008 #define SYMBOL_CHOICE 0x0010 #define SYMBOL_CHOICEVAL 0x0020 -#define SYMBOL_PRINTED 0x0040 #define SYMBOL_VALID 0x0080 #define SYMBOL_OPTIONAL 0x0100 #define SYMBOL_WRITE 0x0200 #define SYMBOL_CHANGED 0x0400 -#define SYMBOL_NEW 0x0800 #define SYMBOL_AUTO 0x1000 #define SYMBOL_CHECKED 0x2000 #define SYMBOL_WARNED 0x8000 +#define SYMBOL_DEF 0x10000 +#define SYMBOL_DEF_USER 0x10000 +#define SYMBOL_DEF_AUTO 0x20000 +#define SYMBOL_DEF3 0x40000 +#define SYMBOL_DEF4 0x80000 #define SYMBOL_MAXLENGTH 256 #define SYMBOL_HASHSIZE 257 #define SYMBOL_HASHMASK 0xff enum prop_type { - P_UNKNOWN, P_PROMPT, P_COMMENT, P_MENU, P_DEFAULT, P_CHOICE, P_SELECT, P_RANGE + P_UNKNOWN, P_PROMPT, P_COMMENT, P_MENU, P_DEFAULT, P_CHOICE, + P_SELECT, P_RANGE, P_ENV }; struct property { @@ -132,7 +139,7 @@ struct menu { struct property *prompt; struct expr *dep; unsigned int flags; - //char *help; + char *help; struct file *file; int lineno; void *data; @@ -149,6 +156,7 @@ struct file *lookup_file(const char *name); extern struct symbol symbol_yes, symbol_no, symbol_mod; extern struct symbol *modules_sym; +extern struct symbol *sym_defconfig_list; extern int cdebug; struct expr *expr_alloc_symbol(struct symbol *sym); struct expr *expr_alloc_one(enum expr_type type, struct expr *ce); |