diff options
Diffstat (limited to 'scripts/kconfig/confdata.c')
-rw-r--r-- | scripts/kconfig/confdata.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c index 140742ebd73c..4bbbb5b09c8d 100644 --- a/scripts/kconfig/confdata.c +++ b/scripts/kconfig/confdata.c | |||
@@ -100,7 +100,7 @@ int conf_read_simple(const char *name, int def) | |||
100 | in = zconf_fopen(name); | 100 | in = zconf_fopen(name); |
101 | if (in) | 101 | if (in) |
102 | goto load; | 102 | goto load; |
103 | sym_change_count++; | 103 | sym_add_change_count(1); |
104 | if (!sym_defconfig_list) | 104 | if (!sym_defconfig_list) |
105 | return 1; | 105 | return 1; |
106 | 106 | ||
@@ -312,7 +312,7 @@ int conf_read(const char *name) | |||
312 | struct expr *e; | 312 | struct expr *e; |
313 | int i, flags; | 313 | int i, flags; |
314 | 314 | ||
315 | sym_change_count = 0; | 315 | sym_set_change_count(0); |
316 | 316 | ||
317 | if (conf_read_simple(name, S_DEF_USER)) | 317 | if (conf_read_simple(name, S_DEF_USER)) |
318 | return 1; | 318 | return 1; |
@@ -364,7 +364,7 @@ int conf_read(const char *name) | |||
364 | sym->flags &= flags | ~SYMBOL_DEF_USER; | 364 | sym->flags &= flags | ~SYMBOL_DEF_USER; |
365 | } | 365 | } |
366 | 366 | ||
367 | sym_change_count += conf_warnings || conf_unsaved; | 367 | sym_add_change_count(conf_warnings || conf_unsaved); |
368 | 368 | ||
369 | return 0; | 369 | return 0; |
370 | } | 370 | } |
@@ -528,7 +528,7 @@ int conf_write(const char *name) | |||
528 | "# configuration written to %s\n" | 528 | "# configuration written to %s\n" |
529 | "#\n"), newname); | 529 | "#\n"), newname); |
530 | 530 | ||
531 | sym_change_count = 0; | 531 | sym_set_change_count(0); |
532 | 532 | ||
533 | return 0; | 533 | return 0; |
534 | } | 534 | } |
@@ -766,6 +766,18 @@ int conf_write_autoconf(void) | |||
766 | return 0; | 766 | return 0; |
767 | } | 767 | } |
768 | 768 | ||
769 | static int sym_change_count; | ||
770 | |||
771 | void sym_set_change_count(int count) | ||
772 | { | ||
773 | sym_change_count = count; | ||
774 | } | ||
775 | |||
776 | void sym_add_change_count(int count) | ||
777 | { | ||
778 | sym_change_count += count; | ||
779 | } | ||
780 | |||
769 | bool conf_get_changed(void) | 781 | bool conf_get_changed(void) |
770 | { | 782 | { |
771 | return sym_change_count; | 783 | return sym_change_count; |