make listnewconfig will list the individual options that need to be set.
This is useful but there's no easy way to get the help text associated
with the options at the same time. Introduce a new targe
'make helpnewconfig' which lists the full help text of all the
new options as well. This makes it easier to automatically generate
changes that are easy for humans to review. This command also adds
markers between each option for easier parsing.
Signed-off-by: Laura Abbott <labbott@redhat.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
defconfig,
savedefconfig,
listnewconfig,
defconfig,
savedefconfig,
listnewconfig,
olddefconfig,
};
static enum input_mode input_mode = oldaskconfig;
olddefconfig,
};
static enum input_mode input_mode = oldaskconfig;
printf("%s%s=%s\n", CONFIG_, sym->name, str);
}
}
printf("%s%s=%s\n", CONFIG_, sym->name, str);
}
}
+ } else if (input_mode == helpnewconfig) {
+ printf("-----\n");
+ print_help(menu);
+ printf("-----\n");
+
} else {
if (!conf_cnt++)
printf("*\n* Restart config...\n*\n");
} else {
if (!conf_cnt++)
printf("*\n* Restart config...\n*\n");
{"alldefconfig", no_argument, NULL, alldefconfig},
{"randconfig", no_argument, NULL, randconfig},
{"listnewconfig", no_argument, NULL, listnewconfig},
{"alldefconfig", no_argument, NULL, alldefconfig},
{"randconfig", no_argument, NULL, randconfig},
{"listnewconfig", no_argument, NULL, listnewconfig},
+ {"helpnewconfig", no_argument, NULL, helpnewconfig},
{"olddefconfig", no_argument, NULL, olddefconfig},
{NULL, 0, NULL, 0}
};
{"olddefconfig", no_argument, NULL, olddefconfig},
{NULL, 0, NULL, 0}
};
printf("Usage: %s [-s] [option] <kconfig-file>\n", progname);
printf("[option] is _one_ of the following:\n");
printf(" --listnewconfig List new options\n");
printf("Usage: %s [-s] [option] <kconfig-file>\n", progname);
printf("[option] is _one_ of the following:\n");
printf(" --listnewconfig List new options\n");
+ printf(" --helpnewconfig List new options and help text\n");
printf(" --oldaskconfig Start a new configuration using a line-oriented program\n");
printf(" --oldconfig Update a configuration using a provided .config as base\n");
printf(" --syncconfig Similar to oldconfig but generates configuration in\n"
printf(" --oldaskconfig Start a new configuration using a line-oriented program\n");
printf(" --oldconfig Update a configuration using a provided .config as base\n");
printf(" --syncconfig Similar to oldconfig but generates configuration in\n"
case allmodconfig:
case alldefconfig:
case listnewconfig:
case allmodconfig:
case alldefconfig:
case listnewconfig:
case olddefconfig:
break;
case '?':
case olddefconfig:
break;
case '?':
case oldaskconfig:
case oldconfig:
case listnewconfig:
case oldaskconfig:
case oldconfig:
case listnewconfig:
case olddefconfig:
conf_read(NULL);
break;
case olddefconfig:
conf_read(NULL);
break;
/* fall through */
case oldconfig:
case listnewconfig:
/* fall through */
case oldconfig:
case listnewconfig:
case syncconfig:
/* Update until a loop caused no more changes */
do {
case syncconfig:
/* Update until a loop caused no more changes */
do {
defconfig_file);
return 1;
}
defconfig_file);
return 1;
}
- } else if (input_mode != listnewconfig) {
+ } else if (input_mode != listnewconfig && input_mode != helpnewconfig) {
if (!no_conf_write && conf_write(NULL)) {
fprintf(stderr, "\n*** Error during writing of the configuration.\n\n");
exit(1);
if (!no_conf_write && conf_write(NULL)) {
fprintf(stderr, "\n*** Error during writing of the configuration.\n\n");
exit(1);