From b321429325e4c911c379a5bf4156c9fc9713e425 Mon Sep 17 00:00:00 2001 From: Karsten Wiese Date: Wed, 13 Dec 2006 00:34:06 -0800 Subject: [PATCH] kconfig: new function "bool conf_get_changed(void)" Run "make xconfig" on a freshly untarred kernel-tree. Look at the floppy disk icon of the qt application, that has just started: Its in a normal, active state. Mouse click on it: .config is being saved. This patch series changes things so taht after the mouse click on the floppy disk icon, the icon is greyed out. If you mouse click on it now, nothing happens. If you change some CONFIG_*, the floppy disk icon returns to "active state", that is, if you mouse click it now, .config is written. This patch: Returns sym_change_count to reflect the .config's change state. All read only accesses of sym_change_count are replaced by calls to conf_get_changed() . mconfig.c is manipulated to ask for saving only when conf_get_changed() returned true. Signed-off-by: Karsten Wiese Cc: Sam Ravnborg Cc: Roman Zippel Acked-by: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- scripts/kconfig/confdata.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'scripts/kconfig/confdata.c') diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c index 66b15ef0293..140742ebd73 100644 --- a/scripts/kconfig/confdata.c +++ b/scripts/kconfig/confdata.c @@ -432,7 +432,7 @@ int conf_write(const char *name) use_timestamp ? "# " : "", use_timestamp ? ctime(&now) : ""); - if (!sym_change_count) + if (!conf_get_changed()) sym_clear_all_valid(); menu = rootmenu.list; @@ -765,3 +765,8 @@ int conf_write_autoconf(void) return 0; } + +bool conf_get_changed(void) +{ + return sym_change_count; +} -- cgit v1.2.3