scripts/config: fix an option processing error that caused duplication in diffconfig...
authorFelix Fietkau <nbd@openwrt.org>
Thu, 2 May 2013 14:06:10 +0000 (14:06 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Thu, 2 May 2013 14:06:10 +0000 (14:06 +0000)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 36522

scripts/config/conf.c

index 1f94816cf209e357ef3347a0bce8158798d978bb..b769654a89b8c65cb491a36e084e8cb6c3b2890f 100644 (file)
@@ -502,7 +502,6 @@ int main(int ac, char **av)
        tty_stdio = isatty(0) && isatty(1) && isatty(2);
 
        while ((opt = getopt_long(ac, av, "r:w:", long_opts, NULL)) != -1) {
-               input_mode = (enum input_mode)opt;
                switch (opt) {
                case silentoldconfig:
                        sync_kconfig = 1;
@@ -537,15 +536,16 @@ int main(int ac, char **av)
                        break;
                case 'r':
                        input_file = optarg;
-                       break;
+                       continue;
                case 'w':
                        output_file = optarg;
-                       break;
+                       continue;
                case '?':
                        conf_usage(progname);
                        exit(1);
                        break;
                }
+               input_mode = (enum input_mode)opt;
        }
        if (ac == optind) {
                printf(_("%s: Kconfig file missing\n"), av[0]);