git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
scripts
/
kconfig
/
symbol.c
diff --git
a/scripts/kconfig/symbol.c
b/scripts/kconfig/symbol.c
index
3d7877a
..
8f06c47
100644
(file)
--- a/
scripts/kconfig/symbol.c
+++ b/
scripts/kconfig/symbol.c
@@
-15,22
+15,22
@@
struct symbol symbol_yes = {
.name = "y",
.curr = { "y", yes },
struct symbol symbol_yes = {
.name = "y",
.curr = { "y", yes },
- .flags = SYMBOL_
YES
|SYMBOL_VALID,
+ .flags = SYMBOL_
CONST
|SYMBOL_VALID,
}, symbol_mod = {
.name = "m",
.curr = { "m", mod },
}, symbol_mod = {
.name = "m",
.curr = { "m", mod },
- .flags = SYMBOL_
MOD
|SYMBOL_VALID,
+ .flags = SYMBOL_
CONST
|SYMBOL_VALID,
}, symbol_no = {
.name = "n",
.curr = { "n", no },
}, symbol_no = {
.name = "n",
.curr = { "n", no },
- .flags = SYMBOL_
NO
|SYMBOL_VALID,
+ .flags = SYMBOL_
CONST
|SYMBOL_VALID,
}, symbol_empty = {
.name = "",
.curr = { "", no },
.flags = SYMBOL_VALID,
};
}, symbol_empty = {
.name = "",
.curr = { "", no },
.flags = SYMBOL_VALID,
};
-
int sym_change_coun
t;
+
struct symbol *sym_defconfig_lis
t;
struct symbol *modules_sym;
tristate modules_val;
struct symbol *modules_sym;
tristate modules_val;
@@
-227,7
+227,7
@@
static struct symbol *sym_calc_choice(struct symbol *sym)
struct expr *e;
/* is the user choice visible? */
struct expr *e;
/* is the user choice visible? */
- def_sym = sym->
user
.val;
+ def_sym = sym->
def[S_DEF_USER]
.val;
if (def_sym) {
sym_calc_visibility(def_sym);
if (def_sym->visible != no)
if (def_sym) {
sym_calc_visibility(def_sym);
if (def_sym->visible != no)
@@
-306,7
+306,7
@@
void sym_calc_value(struct symbol *sym)
} else if (E_OR(sym->visible, sym->rev_dep.tri) != no) {
sym->flags |= SYMBOL_WRITE;
if (sym_has_value(sym))
} else if (E_OR(sym->visible, sym->rev_dep.tri) != no) {
sym->flags |= SYMBOL_WRITE;
if (sym_has_value(sym))
- newval.tri = sym->
user
.tri;
+ newval.tri = sym->
def[S_DEF_USER]
.tri;
else if (!sym_is_choice(sym)) {
prop = sym_get_default_prop(sym);
if (prop)
else if (!sym_is_choice(sym)) {
prop = sym_get_default_prop(sym);
if (prop)
@@
-329,7
+329,7
@@
void sym_calc_value(struct symbol *sym)
if (sym->visible != no) {
sym->flags |= SYMBOL_WRITE;
if (sym_has_value(sym)) {
if (sym->visible != no) {
sym->flags |= SYMBOL_WRITE;
if (sym_has_value(sym)) {
- newval.val = sym->
user
.val;
+ newval.val = sym->
def[S_DEF_USER]
.val;
break;
}
}
break;
}
}
@@
-352,10
+352,13
@@
void sym_calc_value(struct symbol *sym)
sym->curr.val = sym_calc_choice(sym);
sym_validate_range(sym);
sym->curr.val = sym_calc_choice(sym);
sym_validate_range(sym);
- if (memcmp(&oldval, &sym->curr, sizeof(oldval)))
+ if (memcmp(&oldval, &sym->curr, sizeof(oldval)))
{
sym_set_changed(sym);
sym_set_changed(sym);
- if (modules_sym == sym)
- modules_val = modules_sym->curr.tri;
+ if (modules_sym == sym) {
+ sym_set_all_changed();
+ modules_val = modules_sym->curr.tri;
+ }
+ }
if (sym_is_choice(sym)) {
int flags = sym->flags & (SYMBOL_CHANGED | SYMBOL_WRITE);
if (sym_is_choice(sym)) {
int flags = sym->flags & (SYMBOL_CHANGED | SYMBOL_WRITE);
@@
-375,7
+378,7
@@
void sym_clear_all_valid(void)
for_all_symbols(i, sym)
sym->flags &= ~SYMBOL_VALID;
for_all_symbols(i, sym)
sym->flags &= ~SYMBOL_VALID;
- sym_
change_count++
;
+ sym_
add_change_count(1)
;
if (modules_sym)
sym_calc_value(modules_sym);
}
if (modules_sym)
sym_calc_value(modules_sym);
}
@@
-426,8
+429,8
@@
bool sym_set_tristate_value(struct symbol *sym, tristate val)
if (oldval != val && !sym_tristate_within_range(sym, val))
return false;
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);
}
/*
sym_set_changed(sym);
}
/*
@@
-439,21
+442,18
@@
bool sym_set_tristate_value(struct symbol *sym, tristate val)
struct property *prop;
struct expr *e;
struct property *prop;
struct expr *e;
- cs->
user
.val = sym;
- cs->flags
&= ~SYMBOL_NEW
;
+ cs->
def[S_DEF_USER]
.val = sym;
+ 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)
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
;
}
}
}
}
- sym->
user
.tri = val;
- if (oldval != val)
{
+ sym->
def[S_DEF_USER]
.tri = val;
+ if (oldval != val)
sym_clear_all_valid();
sym_clear_all_valid();
- if (sym == modules_sym)
- sym_set_all_changed();
- }
return true;
}
return true;
}
@@
-591,20
+591,20
@@
bool sym_set_string_value(struct symbol *sym, const char *newval)
if (!sym_string_within_range(sym, newval))
return false;
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);
}
sym_set_changed(sym);
}
- oldval = sym->
user
.val;
+ oldval = sym->
def[S_DEF_USER]
.val;
size = strlen(newval) + 1;
if (sym->type == S_HEX && (newval[0] != '0' || (newval[1] != 'x' && newval[1] != 'X'))) {
size += 2;
size = strlen(newval) + 1;
if (sym->type == S_HEX && (newval[0] != '0' || (newval[1] != 'x' && newval[1] != 'X'))) {
size += 2;
- sym->
user
.val = val = malloc(size);
+ sym->
def[S_DEF_USER]
.val = val = malloc(size);
*val++ = '0';
*val++ = 'x';
} else if (!oldval || strcmp(oldval, newval))
*val++ = '0';
*val++ = 'x';
} else if (!oldval || strcmp(oldval, newval))
- sym->
user
.val = val = malloc(size);
+ sym->
def[S_DEF_USER]
.val = val = malloc(size);
else
return true;
else
return true;
@@
-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;
memset(symbol, 0, sizeof(*symbol));
symbol->name = new_name;
symbol->type = S_UNKNOWN;
- symbol->flags = SYMBOL_NEW;
if (isconst)
symbol->flags |= SYMBOL_CONST;
if (isconst)
symbol->flags |= SYMBOL_CONST;