summaryrefslogtreecommitdiffstats
path: root/scripts/kconfig/symbol.c
diff options
context:
space:
mode:
authorRoman Zippel <zippel@linux-m68k.org>2006-06-09 07:12:42 +0200
committerSam Ravnborg <sam@mars.ravnborg.org>2006-06-09 07:31:30 +0200
commit669bfad906522e74ee8d962801552a8c224c0d63 (patch)
tree84b7e85d7d731b7f188c38d83139f9b6d4acaa56 /scripts/kconfig/symbol.c
parentkconfig: allow multiple default values per symbol (diff)
downloadlinux-669bfad906522e74ee8d962801552a8c224c0d63.tar.xz
linux-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 '')
-rw-r--r--scripts/kconfig/symbol.c13
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;