aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/kconfig/confdata.c22
1 files changed, 18 insertions, 4 deletions
diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
index 1b5df589f3ae..a9e3b6abf661 100644
--- a/scripts/kconfig/confdata.c
+++ b/scripts/kconfig/confdata.c
@@ -98,20 +98,28 @@ int conf_read_simple(const char *name)
98 in = zconf_fopen(name); 98 in = zconf_fopen(name);
99 } else { 99 } else {
100 const char **names = conf_confnames; 100 const char **names = conf_confnames;
101 name = *names++;
102 if (!name)
103 return 1;
104 in = zconf_fopen(name);
105 if (in)
106 goto load;
107 sym_change_count++;
101 while ((name = *names++)) { 108 while ((name = *names++)) {
102 name = conf_expand_value(name); 109 name = conf_expand_value(name);
103 in = zconf_fopen(name); 110 in = zconf_fopen(name);
104 if (in) { 111 if (in) {
105 printf(_("#\n" 112 printf(_("#\n"
106 "# using defaults found in %s\n" 113 "# using defaults found in %s\n"
107 "#\n"), name); 114 "#\n"), name);
108 break; 115 goto load;
109 } 116 }
110 } 117 }
111 } 118 }
112 if (!in) 119 if (!in)
113 return 1; 120 return 1;
114 121
122load:
115 conf_filename = name; 123 conf_filename = name;
116 conf_lineno = 0; 124 conf_lineno = 0;
117 conf_warnings = 0; 125 conf_warnings = 0;
@@ -275,6 +283,8 @@ int conf_read(const char *name)
275 struct expr *e; 283 struct expr *e;
276 int i; 284 int i;
277 285
286 sym_change_count = 0;
287
278 if (conf_read_simple(name)) 288 if (conf_read_simple(name))
279 return 1; 289 return 1;
280 290
@@ -325,7 +335,7 @@ int conf_read(const char *name)
325 sym->flags |= e->right.sym->flags & SYMBOL_NEW; 335 sym->flags |= e->right.sym->flags & SYMBOL_NEW;
326 } 336 }
327 337
328 sym_change_count = conf_warnings || conf_unsaved; 338 sym_change_count += conf_warnings || conf_unsaved;
329 339
330 return 0; 340 return 0;
331} 341}
@@ -524,6 +534,10 @@ int conf_write(const char *name)
524 if (rename(newname, tmpname)) 534 if (rename(newname, tmpname))
525 return 1; 535 return 1;
526 536
537 printf(_("#\n"
538 "# configuration written to %s\n"
539 "#\n"), tmpname);
540
527 sym_change_count = 0; 541 sym_change_count = 0;
528 542
529 return 0; 543 return 0;