diff options
author | Karel Kočí <cynerd@email.cz> | 2015-05-04 22:47:00 +0200 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2015-05-04 22:47:00 +0200 |
commit | 9a1f3ff8fbff9dd418242eefa7aa69dfd38609c5 (patch) | |
tree | a4a6a4275ba17f7820d1c0e2f973250f93a69a27 /scripts/write_config | |
parent | 873c7efe496cfd2398b750a616781a5234ae3c6b (diff) | |
download | linux-conf-perf-9a1f3ff8fbff9dd418242eefa7aa69dfd38609c5.tar.gz linux-conf-perf-9a1f3ff8fbff9dd418242eefa7aa69dfd38609c5.tar.bz2 linux-conf-perf-9a1f3ff8fbff9dd418242eefa7aa69dfd38609c5.zip |
Add some configuration options and clean write_conf
Diffstat (limited to 'scripts/write_config')
-rw-r--r-- | scripts/write_config/solution.c | 11 | ||||
-rw-r--r-- | scripts/write_config/write.c | 6 |
2 files changed, 9 insertions, 8 deletions
diff --git a/scripts/write_config/solution.c b/scripts/write_config/solution.c index a8d9fc7..f575864 100644 --- a/scripts/write_config/solution.c +++ b/scripts/write_config/solution.c @@ -1,5 +1,6 @@ #include "solution.h" +extern int exit_status; void solution_check(struct symlist *sl, FILE * f) { int c; // skip first line @@ -28,20 +29,16 @@ void solution_check(struct symlist *sl, FILE * f) { continue; if (sl->array[id - 1].sym == NULL) continue; - //tristate val = sym_get_tristate_value(sl->array[id - 1].sym); - //sym_set_tristate_value(sl->array[id - 1].sym, neg ? no : yes); - //sym_calc_value(sl->array[id - 1].sym); if (neg == (sym_get_tristate_value(sl->array[id - 1].sym) == no ? true : false)) - //printf("Ok\n"); { - } else + } else { printf("Problem %s=%d/%d\n", sl->array[id - 1].sym->name, !neg, sym_get_tristate_value(sl->array[id - 1].sym)); - //if (sym_get_tristate_value(sl->array[id - 1].sym) != val) - //printf("Change: %s\n", sl->array[id - 1].sym->name); + exit_status++; + } } else { if (w_pos >= w_size) { w_size *= 2; diff --git a/scripts/write_config/write.c b/scripts/write_config/write.c index 86895b6..29fcd60 100644 --- a/scripts/write_config/write.c +++ b/scripts/write_config/write.c @@ -11,7 +11,10 @@ int verbose_level; char *file, *folder; +int exit_status; + int main(int argc, char **argv) { + exit_status = 0; verbose_level = 1; int i; for (i = 1; i < argc; i++) { @@ -47,6 +50,7 @@ int main(int argc, char **argv) { textdomain(PACKAGE); conf_parse(file); + struct symbol *sym; //conf_read(def_config_file); conf_read(".config"); @@ -68,5 +72,5 @@ int main(int argc, char **argv) { conf_write(".config"); - return 0; + return exit_status; } |