[kernel/2.6.32] refresh patches
[openwrt.git] / scripts / config / conf.c
index 10eeae5..0a44a2e 100644 (file)
@@ -508,9 +508,10 @@ int main(int ac, char **av)
 {
        int i = 1;
        const char *name;
+       char *output = NULL;
        struct stat tmpstat;
 
-       if (ac > i && av[i][0] == '-') {
+       while (ac > i && av[i][0] == '-') {
                switch (av[i++][1]) {
                case 'o':
                        input_mode = ask_new;
@@ -531,6 +532,9 @@ int main(int ac, char **av)
                                exit(1);
                        }
                        break;
+               case 'w':
+                       output = av[i++];
+                       break;
                case 'n':
                        input_mode = set_no;
                        break;
@@ -570,7 +574,7 @@ int main(int ac, char **av)
        case ask_silent:
                if (stat(".config", &tmpstat)) {
                        printf(_("***\n"
-                               "*** You have not yet configured your kernel!\n"
+                               "*** You have not yet configured your build!\n"
                                "***\n"
                                "*** Please run some configurator (e.g. \"make oldconfig\" or\n"
                                "*** \"make menuconfig\" or \"make xconfig\").\n"
@@ -579,28 +583,11 @@ int main(int ac, char **av)
                }
        case ask_all:
        case ask_new:
-               conf_read(NULL);
-               break;
        case set_no:
        case set_mod:
        case set_yes:
        case set_random:
-               name = getenv("KCONFIG_ALLCONFIG");
-               if (name && !stat(name, &tmpstat)) {
-                       conf_read_simple(name);
-                       break;
-               }
-               switch (input_mode) {
-               case set_no:     name = "allno.config"; break;
-               case set_mod:    name = "allmod.config"; break;
-               case set_yes:    name = "allyes.config"; break;
-               case set_random: name = "allrandom.config"; break;
-               default: break;
-               }
-               if (!stat(name, &tmpstat))
-                       conf_read_simple(name);
-               else if (!stat("all.config", &tmpstat))
-                       conf_read_simple("all.config");
+               conf_read(NULL);
                break;
        default:
                break;
@@ -618,8 +605,8 @@ int main(int ac, char **av)
                conf_cnt = 0;
                check_conf(&rootmenu);
        } while (conf_cnt);
-       if (conf_write(NULL)) {
-               fprintf(stderr, _("\n*** Error during writing of the kernel configuration.\n\n"));
+       if (conf_write(output)) {
+               fprintf(stderr, _("\n*** Error during writing of the build configuration.\n\n"));
                return 1;
        }
        return 0;
This page took 0.021931 seconds and 4 git commands to generate.