aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--scripts/kconfig/conf.c2
-rw-r--r--scripts/kconfig/confdata.c7
-rw-r--r--scripts/kconfig/lkc_proto.h1
-rw-r--r--scripts/kconfig/mconf.c21
-rw-r--r--scripts/kconfig/qconf.cc2
5 files changed, 23 insertions, 10 deletions
diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c
index 4dcb8867b5f4..124b341a18c0 100644
--- a/scripts/kconfig/conf.c
+++ b/scripts/kconfig/conf.c
@@ -600,7 +600,7 @@ int main(int ac, char **av)
600 input_mode = ask_silent; 600 input_mode = ask_silent;
601 valid_stdin = 1; 601 valid_stdin = 1;
602 } 602 }
603 } else if (sym_change_count) { 603 } else if (conf_get_changed()) {
604 name = getenv("KCONFIG_NOSILENTUPDATE"); 604 name = getenv("KCONFIG_NOSILENTUPDATE");
605 if (name && *name) { 605 if (name && *name) {
606 fprintf(stderr, _("\n*** Kernel configuration requires explicit update.\n\n")); 606 fprintf(stderr, _("\n*** Kernel configuration requires explicit update.\n\n"));
diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
index 66b15ef02931..140742ebd73c 100644
--- a/scripts/kconfig/confdata.c
+++ b/scripts/kconfig/confdata.c
@@ -432,7 +432,7 @@ int conf_write(const char *name)
432 use_timestamp ? "# " : "", 432 use_timestamp ? "# " : "",
433 use_timestamp ? ctime(&now) : ""); 433 use_timestamp ? ctime(&now) : "");
434 434
435 if (!sym_change_count) 435 if (!conf_get_changed())
436 sym_clear_all_valid(); 436 sym_clear_all_valid();
437 437
438 menu = rootmenu.list; 438 menu = rootmenu.list;
@@ -765,3 +765,8 @@ int conf_write_autoconf(void)
765 765
766 return 0; 766 return 0;
767} 767}
768
769bool conf_get_changed(void)
770{
771 return sym_change_count;
772}
diff --git a/scripts/kconfig/lkc_proto.h b/scripts/kconfig/lkc_proto.h
index a263746cfa7d..9f1823c88b73 100644
--- a/scripts/kconfig/lkc_proto.h
+++ b/scripts/kconfig/lkc_proto.h
@@ -5,6 +5,7 @@ P(conf_read,int,(const char *name));
5P(conf_read_simple,int,(const char *name, int)); 5P(conf_read_simple,int,(const char *name, int));
6P(conf_write,int,(const char *name)); 6P(conf_write,int,(const char *name));
7P(conf_write_autoconf,int,(void)); 7P(conf_write_autoconf,int,(void));
8P(conf_get_changed,bool,(void));
8 9
9/* menu.c */ 10/* menu.c */
10P(rootmenu,struct menu,); 11P(rootmenu,struct menu,);
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)
890 do { 890 do {
891 conf(&rootmenu); 891 conf(&rootmenu);
892 dialog_clear(); 892 dialog_clear();
893 res = dialog_yesno(NULL, 893 if (conf_get_changed())
894 _("Do you wish to save your " 894 res = dialog_yesno(NULL,
895 "new kernel configuration?\n" 895 _("Do you wish to save your "
896 "<ESC><ESC> to continue."), 896 "new kernel configuration?\n"
897 6, 60); 897 "<ESC><ESC> to continue."),
898 6, 60);
899 else
900 res = -1;
898 } while (res == KEY_ESC); 901 } while (res == KEY_ESC);
899 end_dialog(); 902 end_dialog();
900 if (res == 0) { 903
904 switch (res) {
905 case 0:
901 if (conf_write(NULL)) { 906 if (conf_write(NULL)) {
902 fprintf(stderr, _("\n\n" 907 fprintf(stderr, _("\n\n"
903 "Error during writing of the kernel configuration.\n" 908 "Error during writing of the kernel configuration.\n"
@@ -905,11 +910,13 @@ int main(int ac, char **av)
905 "\n\n")); 910 "\n\n"));
906 return 1; 911 return 1;
907 } 912 }
913 case -1:
908 printf(_("\n\n" 914 printf(_("\n\n"
909 "*** End of Linux kernel configuration.\n" 915 "*** End of Linux kernel configuration.\n"
910 "*** Execute 'make' to build the kernel or try 'make help'." 916 "*** Execute 'make' to build the kernel or try 'make help'."
911 "\n\n")); 917 "\n\n"));
912 } else { 918 break;
919 default:
913 fprintf(stderr, _("\n\n" 920 fprintf(stderr, _("\n\n"
914 "Your kernel configuration changes were NOT saved." 921 "Your kernel configuration changes were NOT saved."
915 "\n\n")); 922 "\n\n"));
diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index f5628c57640b..8d60d99bd9f1 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -1585,7 +1585,7 @@ void ConfigMainWindow::showFullView(void)
1585 */ 1585 */
1586void ConfigMainWindow::closeEvent(QCloseEvent* e) 1586void ConfigMainWindow::closeEvent(QCloseEvent* e)
1587{ 1587{
1588 if (!sym_change_count) { 1588 if (!conf_get_changed()) {
1589 e->accept(); 1589 e->accept();
1590 return; 1590 return;
1591 } 1591 }