aboutsummaryrefslogtreecommitdiff
path: root/package/config/confdata.c
diff options
context:
space:
mode:
authorGravatar Peter Korsgaard <jacmet@sunsite.dk>2008-06-19 08:11:43 +0000
committerGravatar Peter Korsgaard <jacmet@sunsite.dk>2008-06-19 08:11:43 +0000
commit1b6f2e0f4c8445100f1ea6bea5b89db15dba0175 (patch)
tree47203e44f22361896d63103608f32c2d8ba87e13 /package/config/confdata.c
parent2c2796719afce7b7a64fa1dd0bec736b10e371da (diff)
downloadbuildroot-1b6f2e0f4c8445100f1ea6bea5b89db15dba0175.tar.gz
buildroot-1b6f2e0f4c8445100f1ea6bea5b89db15dba0175.tar.bz2
package/config: rebase from upstream (2.6.23.14)
From Bernhards tree (2737cfdd)
Diffstat (limited to 'package/config/confdata.c')
-rw-r--r--package/config/confdata.c37
1 files changed, 26 insertions, 11 deletions
diff --git a/package/config/confdata.c b/package/config/confdata.c
index 838ead244f..c54c2855d5 100644
--- a/package/config/confdata.c
+++ b/package/config/confdata.c
@@ -338,27 +338,42 @@ int conf_read(const char *name)
conf_unsaved++;
/* maybe print value in verbose mode... */
sym_ok:
+ if (!sym_is_choice(sym))
+ continue;
+ /* The choice symbol only has a set value (and thus is not new)
+ * if all its visible childs have values.
+ */
+ prop = sym_get_choice_prop(sym);
+ flags = sym->flags;
+ for (e = prop->expr; e; e = e->left.expr)
+ if (e->right.sym->visible != no)
+ flags &= e->right.sym->flags;
+ sym->flags &= flags | ~SYMBOL_DEF_USER;
+ }
+
+ for_all_symbols(i, sym) {
if (sym_has_value(sym) && !sym_is_choice_value(sym)) {
- if (sym->visible == no)
+ /* Reset values of generates values, so they'll appear
+ * as new, if they should become visible, but that
+ * doesn't quite work if the Kconfig and the saved
+ * configuration disagree.
+ */
+ if (sym->visible == no && !conf_unsaved)
sym->flags &= ~SYMBOL_DEF_USER;
switch (sym->type) {
case S_STRING:
case S_INT:
case S_HEX:
- if (!sym_string_within_range(sym, sym->def[S_DEF_USER].val))
- sym->flags &= ~(SYMBOL_VALID|SYMBOL_DEF_USER);
+ /* Reset a string value if it's out of range */
+ if (sym_string_within_range(sym, sym->def[S_DEF_USER].val))
+ break;
+ sym->flags &= ~(SYMBOL_VALID|SYMBOL_DEF_USER);
+ conf_unsaved++;
+ break;
default:
break;
}
}
- if (!sym_is_choice(sym))
- continue;
- prop = sym_get_choice_prop(sym);
- flags = sym->flags;
- for (e = prop->expr; e; e = e->left.expr)
- if (e->right.sym->visible != no)
- flags &= e->right.sym->flags;
- sym->flags &= flags | ~SYMBOL_DEF_USER;
}
sym_add_change_count(conf_warnings || conf_unsaved);