X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=scripts%2Fkconfig%2Fconf.c;h=1199baf866ca1c24c08b46972144e24f43353ff5;hb=cab8e5c4444cb7d9b8035de5d81fbfd5284a02fa;hp=8012d1076876bb1f4ee9766a63720f0e53d9f829;hpb=9dfb563b07b1aafcd7d40528ebfa7f9ce28f0556;p=linux-2.6-omap-h63xx.git diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c index 8012d107687..1199baf866c 100644 --- a/scripts/kconfig/conf.c +++ b/scripts/kconfig/conf.c @@ -539,6 +539,7 @@ int main(int ac, char **av) name = av[i]; if (!name) { printf(_("%s: Kconfig file missing\n"), av[0]); + exit(1); } conf_parse(name); //zconfdump(stdout); @@ -557,6 +558,7 @@ int main(int ac, char **av) if (stat(".config", &tmpstat)) { printf(_("***\n" "*** You have not yet configured your kernel!\n" + "*** (missing kernel .config file)\n" "***\n" "*** Please run some configurator (e.g. \"make oldconfig\" or\n" "*** \"make menuconfig\" or \"make xconfig\").\n" @@ -573,7 +575,7 @@ int main(int ac, char **av) case set_random: name = getenv("KCONFIG_ALLCONFIG"); if (name && !stat(name, &tmpstat)) { - conf_read_simple(name); + conf_read_simple(name, S_DEF_USER); break; } switch (input_mode) { @@ -584,9 +586,9 @@ int main(int ac, char **av) default: break; } if (!stat(name, &tmpstat)) - conf_read_simple(name); + conf_read_simple(name, S_DEF_USER); else if (!stat("all.config", &tmpstat)) - conf_read_simple("all.config"); + conf_read_simple("all.config", S_DEF_USER); break; default: break; @@ -599,7 +601,15 @@ int main(int ac, char **av) input_mode = ask_silent; valid_stdin = 1; } - } + } else if (conf_get_changed()) { + name = getenv("KCONFIG_NOSILENTUPDATE"); + if (name && *name) { + fprintf(stderr, _("\n*** Kernel configuration requires explicit update.\n\n")); + return 1; + } + } else + goto skip_check; + do { conf_cnt = 0; check_conf(&rootmenu); @@ -608,5 +618,11 @@ int main(int ac, char **av) fprintf(stderr, _("\n*** Error during writing of the kernel configuration.\n\n")); return 1; } +skip_check: + if (input_mode == ask_silent && conf_write_autoconf()) { + fprintf(stderr, _("\n*** Error during writing of the kernel configuration.\n\n")); + return 1; + } + return 0; }