X-Git-Url: https://jxself.org/git/?p=carl9170fw.git;a=blobdiff_plain;f=config%2Fconf.c;h=bd0421791dc811ce6e9097042559f0300275bb8e;hp=130335f371ec1c2ffc61404c8fd2d6812ae9a88b;hb=342b243d70ea8bd00733d288f08fa89cf44a2773;hpb=001b488249ed961ee66e61dccf23866b8d7f8dbd diff --git a/config/conf.c b/config/conf.c index 130335f..bd04217 100644 --- a/config/conf.c +++ b/config/conf.c @@ -31,7 +31,6 @@ enum input_mode { defconfig, savedefconfig, listnewconfig, - oldnoconfig, }; static enum input_mode input_mode = oldaskconfig; @@ -454,7 +453,6 @@ static struct option long_opts[] = { {"alldefconfig", no_argument, NULL, alldefconfig}, {"randconfig", no_argument, NULL, randconfig}, {"listnewconfig", no_argument, NULL, listnewconfig}, - {"noconfig", no_argument, NULL, oldnoconfig}, {NULL, 0, NULL, 0} }; @@ -483,6 +481,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 +492,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; @@ -529,7 +536,6 @@ int main(int ac, char **av) case allmodconfig: case alldefconfig: case listnewconfig: - case oldnoconfig: break; case '?': conf_usage(progname); @@ -563,7 +569,6 @@ int main(int ac, char **av) case oldaskconfig: case oldconfig: case listnewconfig: - case oldnoconfig: conf_read(NULL); break; case allnoconfig: @@ -632,7 +637,6 @@ int main(int ac, char **av) /* fall through */ case oldconfig: case listnewconfig: - case oldnoconfig: /* Update until a loop caused no more changes */ do { conf_cnt = 0; @@ -651,7 +655,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); }