summaryrefslogtreecommitdiff
path: root/misc/tools/kconfig-frontends/frontends/conf/conf.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2013-01-06 19:29:01 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2013-01-06 19:29:01 +0000
commitd9b48f9fc52697a9006de38c45d0157aacddd3a8 (patch)
tree3eede258d09270ed8392ddeb797b3058ed068fe2 /misc/tools/kconfig-frontends/frontends/conf/conf.c
parent21826b9fb273124cca1cf4d5466fe4ab6a948c52 (diff)
downloadnuttx-d9b48f9fc52697a9006de38c45d0157aacddd3a8.tar.gz
nuttx-d9b48f9fc52697a9006de38c45d0157aacddd3a8.tar.bz2
nuttx-d9b48f9fc52697a9006de38c45d0157aacddd3a8.zip
Update kconfig-frontends to 3.7.0
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5484 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'misc/tools/kconfig-frontends/frontends/conf/conf.c')
-rw-r--r--misc/tools/kconfig-frontends/frontends/conf/conf.c25
1 files changed, 16 insertions, 9 deletions
diff --git a/misc/tools/kconfig-frontends/frontends/conf/conf.c b/misc/tools/kconfig-frontends/frontends/conf/conf.c
index 0dc4a2c77..4da3b4adf 100644
--- a/misc/tools/kconfig-frontends/frontends/conf/conf.c
+++ b/misc/tools/kconfig-frontends/frontends/conf/conf.c
@@ -32,7 +32,7 @@ enum input_mode {
defconfig,
savedefconfig,
listnewconfig,
- oldnoconfig,
+ olddefconfig,
} input_mode = oldaskconfig;
static int indent = 1;
@@ -365,7 +365,7 @@ static void conf(struct menu *menu)
case P_MENU:
if ((input_mode == silentoldconfig ||
input_mode == listnewconfig ||
- input_mode == oldnoconfig) &&
+ input_mode == olddefconfig) &&
rootEntry != menu) {
check_conf(menu);
return;
@@ -429,7 +429,7 @@ static void check_conf(struct menu *menu)
if (sym->name && !sym_is_choice_value(sym)) {
printf("%s%s\n", CONFIG_, sym->name);
}
- } else if (input_mode != oldnoconfig) {
+ } else if (input_mode != olddefconfig) {
if (!conf_cnt++)
printf(_("*\n* Restart config...\n*\n"));
rootEntry = menu_get_parent_menu(menu);
@@ -454,7 +454,13 @@ static struct option long_opts[] = {
{"alldefconfig", no_argument, NULL, alldefconfig},
{"randconfig", no_argument, NULL, randconfig},
{"listnewconfig", no_argument, NULL, listnewconfig},
- {"oldnoconfig", no_argument, NULL, oldnoconfig},
+ {"olddefconfig", no_argument, NULL, olddefconfig},
+ /*
+ * oldnoconfig is an alias of olddefconfig, because people already
+ * are dependent on its behavior(sets new symbols to their default
+ * value but not 'n') with the counter-intuitive name.
+ */
+ {"oldnoconfig", no_argument, NULL, olddefconfig},
{NULL, 0, NULL, 0}
};
@@ -467,7 +473,8 @@ static void conf_usage(const char *progname)
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(" --silentoldconfig Same as oldconfig, but quietly, additionally update deps\n");
- printf(" --oldnoconfig Same as silentoldconfig but set new symbols to no\n");
+ printf(" --olddefconfig Same as silentoldconfig but sets new symbols to their default value\n");
+ printf(" --oldnoconfig An alias of olddefconfig\n");
printf(" --defconfig <file> New config with default defined in <file>\n");
printf(" --savedefconfig <file> Save the minimal current configuration to <file>\n");
printf(" --allnoconfig New config where all options are answered with no\n");
@@ -520,7 +527,7 @@ int main(int ac, char **av)
case allmodconfig:
case alldefconfig:
case listnewconfig:
- case oldnoconfig:
+ case olddefconfig:
break;
case '?':
conf_usage(progname);
@@ -565,7 +572,7 @@ int main(int ac, char **av)
case oldaskconfig:
case oldconfig:
case listnewconfig:
- case oldnoconfig:
+ case olddefconfig:
conf_read(NULL);
break;
case allnoconfig:
@@ -645,7 +652,7 @@ int main(int ac, char **av)
/* fall through */
case oldconfig:
case listnewconfig:
- case oldnoconfig:
+ case olddefconfig:
case silentoldconfig:
/* Update until a loop caused no more changes */
do {
@@ -653,7 +660,7 @@ int main(int ac, char **av)
check_conf(&rootmenu);
} while (conf_cnt &&
(input_mode != listnewconfig &&
- input_mode != oldnoconfig));
+ input_mode != olddefconfig));
break;
}