kconfig: suppress "configuration written to .config" for syncconfig
[carl9170fw.git] / config / conf.c
index 130335f371ec1c2ffc61404c8fd2d6812ae9a88b..c19af7d7d99d7bc8b3ebf717dd5a13ac8f66a9f8 100644 (file)
@@ -483,6 +483,7 @@ int main(int ac, char **av)
        int opt;
        const char *name, *defconfig_file = NULL /* gcc uninit */;
        struct stat tmpstat;
+       int no_conf_write = 0;
 
        tty_stdio = isatty(0) && isatty(1);
 
@@ -493,6 +494,14 @@ int main(int ac, char **av)
                }
                input_mode = (enum input_mode)opt;
                switch (opt) {
+               case syncconfig:
+                       /*
+                        * syncconfig is invoked during the build stage.
+                        * Suppress distracting "configuration written to ..."
+                        */
+                       conf_set_message_callback(NULL);
+                        sync_kconfig = 1;
+                       break
                case defconfig:
                case savedefconfig:
                        defconfig_file = optarg;
@@ -651,7 +660,7 @@ int main(int ac, char **av)
                /*
                 * build so we shall update autoconf.
                 */
-               if (conf_write(NULL)) {
+               if (!no_conf_write && conf_write(NULL)) {
                        fprintf(stderr, "\n*** Error during writing of the configuration.\n\n");
                        exit(1);
                }