Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 30586
b: refs/heads/master
c: ddc97ca
h: refs/heads/master
v: v3
  • Loading branch information
Roman Zippel authored and Sam Ravnborg committed Jun 9, 2006
1 parent 2e9ebfb commit 7d09cdb
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 909252d279dd5d47e44c125558e87bb44097289f
refs/heads/master: ddc97cacb310ad68483952e67764c4153c138ed2
22 changes: 18 additions & 4 deletions trunk/scripts/kconfig/confdata.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,20 +98,28 @@ int conf_read_simple(const char *name)
in = zconf_fopen(name);
} else {
const char **names = conf_confnames;
name = *names++;
if (!name)
return 1;
in = zconf_fopen(name);
if (in)
goto load;
sym_change_count++;
while ((name = *names++)) {
name = conf_expand_value(name);
in = zconf_fopen(name);
if (in) {
printf(_("#\n"
"# using defaults found in %s\n"
"#\n"), name);
break;
"# using defaults found in %s\n"
"#\n"), name);
goto load;
}
}
}
if (!in)
return 1;

load:
conf_filename = name;
conf_lineno = 0;
conf_warnings = 0;
Expand Down Expand Up @@ -275,6 +283,8 @@ int conf_read(const char *name)
struct expr *e;
int i;

sym_change_count = 0;

if (conf_read_simple(name))
return 1;

Expand Down Expand Up @@ -325,7 +335,7 @@ int conf_read(const char *name)
sym->flags |= e->right.sym->flags & SYMBOL_NEW;
}

sym_change_count = conf_warnings || conf_unsaved;
sym_change_count += conf_warnings || conf_unsaved;

return 0;
}
Expand Down Expand Up @@ -524,6 +534,10 @@ int conf_write(const char *name)
if (rename(newname, tmpname))
return 1;

printf(_("#\n"
"# configuration written to %s\n"
"#\n"), tmpname);

sym_change_count = 0;

return 0;
Expand Down

0 comments on commit 7d09cdb

Please sign in to comment.