Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 44440
b: refs/heads/master
c: b321429
h: refs/heads/master
v: v3
  • Loading branch information
Karsten Wiese authored and Linus Torvalds committed Dec 13, 2006
1 parent c98e0fb commit bc9d81a
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3dfcaf16135150d0f025047a7525664a41bb2adf
refs/heads/master: b321429325e4c911c379a5bf4156c9fc9713e425
2 changes: 1 addition & 1 deletion trunk/scripts/kconfig/conf.c
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@ int main(int ac, char **av)
input_mode = ask_silent;
valid_stdin = 1;
}
} else if (sym_change_count) {
} else if (conf_get_changed()) {
name = getenv("KCONFIG_NOSILENTUPDATE");
if (name && *name) {
fprintf(stderr, _("\n*** Kernel configuration requires explicit update.\n\n"));
Expand Down
7 changes: 6 additions & 1 deletion trunk/scripts/kconfig/confdata.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -765,3 +765,8 @@ int conf_write_autoconf(void)

return 0;
}

bool conf_get_changed(void)
{
return sym_change_count;
}
1 change: 1 addition & 0 deletions trunk/scripts/kconfig/lkc_proto.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ P(conf_read,int,(const char *name));
P(conf_read_simple,int,(const char *name, int));
P(conf_write,int,(const char *name));
P(conf_write_autoconf,int,(void));
P(conf_get_changed,bool,(void));

/* menu.c */
P(rootmenu,struct menu,);
Expand Down
21 changes: 14 additions & 7 deletions trunk/scripts/kconfig/mconf.c
Original file line number Diff line number Diff line change
Expand Up @@ -890,26 +890,33 @@ 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"
"Your kernel configuration changes were NOT saved."
"\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"));
Expand Down
2 changes: 1 addition & 1 deletion trunk/scripts/kconfig/qconf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1585,7 +1585,7 @@ void ConfigMainWindow::showFullView(void)
*/
void ConfigMainWindow::closeEvent(QCloseEvent* e)
{
if (!sym_change_count) {
if (!conf_get_changed()) {
e->accept();
return;
}
Expand Down

0 comments on commit bc9d81a

Please sign in to comment.