diff options
author | Karsten Wiese <annabellesgarden@yahoo.de> | 2006-12-13 00:34:06 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-13 09:05:48 -0800 |
commit | b321429325e4c911c379a5bf4156c9fc9713e425 (patch) | |
tree | 8781e449e4b0b10da6394f7bf01e0e6004c074ac /scripts/kconfig/mconf.c | |
parent | 3dfcaf16135150d0f025047a7525664a41bb2adf (diff) | |
download | blackbird-op-linux-b321429325e4c911c379a5bf4156c9fc9713e425.tar.gz blackbird-op-linux-b321429325e4c911c379a5bf4156c9fc9713e425.zip |
[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 <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/mconf.c')
-rw-r--r-- | scripts/kconfig/mconf.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c index 08a4c7af93ea..3f9a1321b3e6 100644 --- a/scripts/kconfig/mconf.c +++ b/scripts/kconfig/mconf.c @@ -890,14 +890,19 @@ int main(int ac, char **av) do { conf(&rootmenu); dialog_clear(); - res = dialog_yesno(NULL, - _("Do you wish to save your " - "new kernel configuration?\n" - "<ESC><ESC> to continue."), - 6, 60); + if (conf_get_changed()) + res = dialog_yesno(NULL, + _("Do you wish to save your " + "new kernel configuration?\n" + "<ESC><ESC> to continue."), + 6, 60); + else + res = -1; } while (res == KEY_ESC); end_dialog(); - if (res == 0) { + + switch (res) { + case 0: if (conf_write(NULL)) { fprintf(stderr, _("\n\n" "Error during writing of the kernel configuration.\n" @@ -905,11 +910,13 @@ int main(int ac, char **av) "\n\n")); return 1; } + case -1: printf(_("\n\n" "*** End of Linux kernel configuration.\n" "*** Execute 'make' to build the kernel or try 'make help'." "\n\n")); - } else { + break; + default: fprintf(stderr, _("\n\n" "Your kernel configuration changes were NOT saved." "\n\n")); |