diff options
author | Roman Zippel <zippel@linux-m68k.org> | 2006-06-08 22:12:42 -0700 |
---|---|---|
committer | Sam Ravnborg <sam@mars.ravnborg.org> | 2006-06-09 07:31:30 +0200 |
commit | 669bfad906522e74ee8d962801552a8c224c0d63 (patch) | |
tree | 84b7e85d7d731b7f188c38d83139f9b6d4acaa56 /scripts/kconfig/symbol.c | |
parent | 0c1822e6991a10da6dc391f0a2e2cf5fb2e31238 (diff) | |
download | lwn-669bfad906522e74ee8d962801552a8c224c0d63.tar.gz lwn-669bfad906522e74ee8d962801552a8c224c0d63.zip |
kconfig: allow loading multiple configurations
Extend conf_read_simple() so it can load multiple configurations.
Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'scripts/kconfig/symbol.c')
-rw-r--r-- | scripts/kconfig/symbol.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/scripts/kconfig/symbol.c b/scripts/kconfig/symbol.c index 4ea0050dcb16..78a60ba39e54 100644 --- a/scripts/kconfig/symbol.c +++ b/scripts/kconfig/symbol.c @@ -426,8 +426,8 @@ bool sym_set_tristate_value(struct symbol *sym, tristate val) if (oldval != val && !sym_tristate_within_range(sym, val)) return false; - if (sym->flags & SYMBOL_NEW) { - sym->flags &= ~SYMBOL_NEW; + if (!(sym->flags & SYMBOL_DEF_USER)) { + sym->flags |= SYMBOL_DEF_USER; sym_set_changed(sym); } /* @@ -440,11 +440,11 @@ bool sym_set_tristate_value(struct symbol *sym, tristate val) struct expr *e; cs->def[S_DEF_USER].val = sym; - cs->flags &= ~SYMBOL_NEW; + cs->flags |= SYMBOL_DEF_USER; prop = sym_get_choice_prop(cs); for (e = prop->expr; e; e = e->left.expr) { if (e->right.sym->visible != no) - e->right.sym->flags &= ~SYMBOL_NEW; + e->right.sym->flags |= SYMBOL_DEF_USER; } } @@ -591,8 +591,8 @@ bool sym_set_string_value(struct symbol *sym, const char *newval) if (!sym_string_within_range(sym, newval)) return false; - if (sym->flags & SYMBOL_NEW) { - sym->flags &= ~SYMBOL_NEW; + if (!(sym->flags & SYMBOL_DEF_USER)) { + sym->flags |= SYMBOL_DEF_USER; sym_set_changed(sym); } @@ -679,7 +679,6 @@ struct symbol *sym_lookup(const char *name, int isconst) memset(symbol, 0, sizeof(*symbol)); symbol->name = new_name; symbol->type = S_UNKNOWN; - symbol->flags = SYMBOL_NEW; if (isconst) symbol->flags |= SYMBOL_CONST; |