projects
/
carl9170fw.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
carl9170 toolchain: update binutils, newlib and gmp
[carl9170fw.git]
/
config
/
confdata.c
diff --git
a/config/confdata.c
b/config/confdata.c
index d18626d1497d6610d7f69e5987cbf75f9e663ec7..a124a25e899fde96872ff0a9952e079070339d44 100644
(file)
--- a/
config/confdata.c
+++ b/
config/confdata.c
@@
-534,11
+534,9
@@
int conf_read(const char *name)
switch (sym->type) {
case S_BOOLEAN:
case S_TRISTATE:
switch (sym->type) {
case S_BOOLEAN:
case S_TRISTATE:
- if (sym->def[S_DEF_USER].tri != sym_get_tristate_value(sym))
- break;
- if (!sym_is_choice(sym))
+ if (sym->def[S_DEF_USER].tri == sym_get_tristate_value(sym))
continue;
continue;
- /* fall through */
+ break;
default:
if (!strcmp(sym->curr.val, sym->def[S_DEF_USER].val))
continue;
default:
if (!strcmp(sym->curr.val, sym->def[S_DEF_USER].val))
continue;
@@
-842,7
+840,7
@@
int conf_write_defconfig(const char *filename)
goto next_menu;
sym->flags &= ~SYMBOL_WRITE;
/* If we cannot change the symbol - skip */
goto next_menu;
sym->flags &= ~SYMBOL_WRITE;
/* If we cannot change the symbol - skip */
- if (!sym_is_changable(sym))
+ if (!sym_is_chang
e
able(sym))
goto next_menu;
/* If symbol equals to default value - skip */
if (strcmp(sym_get_string_value(sym), sym_get_string_default(sym)) == 0)
goto next_menu;
/* If symbol equals to default value - skip */
if (strcmp(sym_get_string_value(sym), sym_get_string_default(sym)) == 0)
@@
-896,6
+894,7
@@
int conf_write(const char *name)
const char *str;
char tmpname[PATH_MAX + 1], oldname[PATH_MAX + 1];
char *env;
const char *str;
char tmpname[PATH_MAX + 1], oldname[PATH_MAX + 1];
char *env;
+ int i;
bool need_newline = false;
if (!name)
bool need_newline = false;
if (!name)
@@
-943,7
+942,8
@@
int conf_write(const char *name)
"# %s\n"
"#\n", str);
need_newline = false;
"# %s\n"
"#\n", str);
need_newline = false;
- } else if (!(sym->flags & SYMBOL_CHOICE)) {
+ } else if (!(sym->flags & SYMBOL_CHOICE) &&
+ !(sym->flags & SYMBOL_WRITTEN)) {
sym_calc_value(sym);
if (!(sym->flags & SYMBOL_WRITE))
goto next;
sym_calc_value(sym);
if (!(sym->flags & SYMBOL_WRITE))
goto next;
@@
-951,7
+951,7
@@
int conf_write(const char *name)
fprintf(out, "\n");
need_newline = false;
}
fprintf(out, "\n");
need_newline = false;
}
- sym->flags
&= ~SYMBOL_WRITE
;
+ sym->flags
|= SYMBOL_WRITTEN
;
conf_write_symbol(out, sym, &kconfig_printer_cb, NULL);
}
conf_write_symbol(out, sym, &kconfig_printer_cb, NULL);
}
@@
-977,6
+977,9
@@
next:
}
fclose(out);
}
fclose(out);
+ for_all_symbols(i, sym)
+ sym->flags &= ~SYMBOL_WRITTEN;
+
if (*tmpname) {
if (is_same(name, tmpname)) {
conf_message("No change to %s", name);
if (*tmpname) {
if (is_same(name, tmpname)) {
conf_message("No change to %s", name);
@@
-1111,8
+1114,6
@@
int conf_write_autoconf(int overwrite)
if (!overwrite && is_present(autoconf_name))
return 0;
if (!overwrite && is_present(autoconf_name))
return 0;
- sym_clear_all_valid();
-
conf_write_dep("include/generated/auto.conf.cmd");
if (conf_touch_deps())
conf_write_dep("include/generated/auto.conf.cmd");
if (conf_touch_deps())