diff options
author | Karel Kočí <cynerd@email.cz> | 2015-04-19 13:41:44 +0200 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2015-04-19 13:41:44 +0200 |
commit | f9a0d4a9d4ddd46d0e1e129d4db6f731e7efafa5 (patch) | |
tree | 904bb6be69ad596a2e3935d238d03b77e87bb924 | |
parent | 0f508989d57ebc2de47304007a3c51a1f62f6cc6 (diff) | |
download | linux-conf-perf-f9a0d4a9d4ddd46d0e1e129d4db6f731e7efafa5.tar.gz linux-conf-perf-f9a0d4a9d4ddd46d0e1e129d4db6f731e7efafa5.tar.bz2 linux-conf-perf-f9a0d4a9d4ddd46d0e1e129d4db6f731e7efafa5.zip |
Configure write_config to compare and not set value
-rw-r--r-- | scripts/write_config/solution.c | 10 | ||||
-rw-r--r-- | scripts/write_config/write.c | 4 |
2 files changed, 9 insertions, 5 deletions
diff --git a/scripts/write_config/solution.c b/scripts/write_config/solution.c index 03e3f53..5a82a01 100644 --- a/scripts/write_config/solution.c +++ b/scripts/write_config/solution.c @@ -32,12 +32,14 @@ void solution_set(struct symlist *sl, FILE * f) { if (neg == (sym_get_tristate_value(sl->array[id - 1].sym) == no ? true : false)) - printf("Ok\n"); - else + //printf("Ok\n"); + { + } else printf("Problem %s=%d/%d\n", sl->array[id - 1].sym->name, - !neg, sym_get_tristate_value(sl->array[id - 1].sym)); + !neg, + sym_get_tristate_value(sl->array[id - 1].sym)); //if (sym_get_tristate_value(sl->array[id - 1].sym) != val) - //printf("Change\n"); + //printf("Change: %s\n", sl->array[id - 1].sym->name); } else { if (w_pos >= w_size) { w_size *= 2; diff --git a/scripts/write_config/write.c b/scripts/write_config/write.c index d8e87bf..4bec6aa 100644 --- a/scripts/write_config/write.c +++ b/scripts/write_config/write.c @@ -47,8 +47,8 @@ int main(int argc, char **argv) { textdomain(PACKAGE); conf_parse(file); + //conf_read(def_config_file); conf_read(".config"); - conf_write(".config"); FILE *f = fopen(symbol_map_file, "r"); if (f == NULL) { @@ -66,5 +66,7 @@ int main(int argc, char **argv) { solution_set(sl, f); fclose(f); + conf_write(".config"); + return 0; } |