diff options
author | Karsten Wiese <annabellesgarden@yahoo.de> | 2006-12-13 00:34:07 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-13 09:05:48 -0800 |
commit | bfc10001b11e51b59ac901d17c5f05361bd2351d (patch) | |
tree | eee8c1ed8f7ec7389656ee5bedd087b3ccee2b9a /scripts/kconfig/confdata.c | |
parent | b321429325e4c911c379a5bf4156c9fc9713e425 (diff) | |
download | linux-bfc10001b11e51b59ac901d17c5f05361bd2351d.tar.gz linux-bfc10001b11e51b59ac901d17c5f05361bd2351d.tar.bz2 linux-bfc10001b11e51b59ac901d17c5f05361bd2351d.zip |
[PATCH] kconfig: make sym_change_count static, let it be altered by 2 functions only
Those two functions are
void sym_set_change_count(int count)
and
void sym_add_change_count(int count)
All write accesses to sym_change_count are replaced by calls to above
functions.
Variable and changer-functions are moved to confdata.c. IMO thats ok, as
sym_change_count is an attribute of the .config's change state.
Signed-off-by: Karsten Wiese <fzu@wemgehoertderstaat.de>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
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) in = zconf_fopen(name); if (in) goto load; - sym_change_count++; + sym_add_change_count(1); if (!sym_defconfig_list) return 1; @@ -312,7 +312,7 @@ int conf_read(const char *name) struct expr *e; int i, flags; - sym_change_count = 0; + sym_set_change_count(0); if (conf_read_simple(name, S_DEF_USER)) return 1; @@ -364,7 +364,7 @@ int conf_read(const char *name) sym->flags &= flags | ~SYMBOL_DEF_USER; } - sym_change_count += conf_warnings || conf_unsaved; + sym_add_change_count(conf_warnings || conf_unsaved); return 0; } @@ -528,7 +528,7 @@ int conf_write(const char *name) "# configuration written to %s\n" "#\n"), newname); - sym_change_count = 0; + sym_set_change_count(0); return 0; } @@ -766,6 +766,18 @@ int conf_write_autoconf(void) return 0; } +static int sym_change_count; + +void sym_set_change_count(int count) +{ + sym_change_count = count; +} + +void sym_add_change_count(int count) +{ + sym_change_count += count; +} + bool conf_get_changed(void) { return sym_change_count; |