aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Lee <adam8157@gmail.com>2012-08-31 13:05:17 -0400
committerMichal Marek <mmarek@suse.cz>2012-09-27 12:18:07 -0400
commitfb16d8912db5268f29706010ecafff74b971c58d (patch)
treeaa79ca1cbc5be1e4afde9bc90c856e4419403591
parent95ac9b3b585d20df116c5bea1511d9eb5758ac81 (diff)
kconfig: replace 'oldnoconfig' with 'olddefconfig', and keep the old name as an alias
As 67d34a6a391369269a2e5dba8a5f42cc4cd50231 said, 'oldnoconfig' doesn't set new symbols to 'n', but instead sets it to their default values. So, this patch replaces 'oldnoconfig' with 'olddefconfig', stop making people confused, and keep the old name 'oldnoconfig' as an alias, because people already are dependent on its behavior with the counter-intuitive name. Signed-off-by: Adam Lee <adam8157@gmail.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
-rw-r--r--scripts/kconfig/Makefile12
-rw-r--r--scripts/kconfig/conf.c25
-rwxr-xr-xtools/testing/ktest/ktest.pl15
3 files changed, 32 insertions, 20 deletions
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
index 77d53999ffb..3091794e935 100644
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -76,11 +76,17 @@ PHONY += allnoconfig allyesconfig allmodconfig alldefconfig randconfig
76allnoconfig allyesconfig allmodconfig alldefconfig randconfig: $(obj)/conf 76allnoconfig allyesconfig allmodconfig alldefconfig randconfig: $(obj)/conf
77 $< --$@ $(Kconfig) 77 $< --$@ $(Kconfig)
78 78
79PHONY += listnewconfig oldnoconfig savedefconfig defconfig 79PHONY += listnewconfig olddefconfig oldnoconfig savedefconfig defconfig
80 80
81listnewconfig oldnoconfig: $(obj)/conf 81listnewconfig olddefconfig: $(obj)/conf
82 $< --$@ $(Kconfig) 82 $< --$@ $(Kconfig)
83 83
84# oldnoconfig is an alias of olddefconfig, because people already are dependent
85# on its behavior(sets new symbols to their default value but not 'n') with the
86# counter-intuitive name.
87oldnoconfig: $(obj)/conf
88 $< --olddefconfig $(Kconfig)
89
84savedefconfig: $(obj)/conf 90savedefconfig: $(obj)/conf
85 $< --$@=defconfig $(Kconfig) 91 $< --$@=defconfig $(Kconfig)
86 92
@@ -114,7 +120,7 @@ help:
114 @echo ' alldefconfig - New config with all symbols set to default' 120 @echo ' alldefconfig - New config with all symbols set to default'
115 @echo ' randconfig - New config with random answer to all options' 121 @echo ' randconfig - New config with random answer to all options'
116 @echo ' listnewconfig - List new options' 122 @echo ' listnewconfig - List new options'
117 @echo ' oldnoconfig - Same as silentoldconfig but sets new symbols to their default value' 123 @echo ' olddefconfig - Same as silentoldconfig but sets new symbols to their default value'
118 124
119# lxdialog stuff 125# lxdialog stuff
120check-lxdialog := $(srctree)/$(src)/lxdialog/check-lxdialog.sh 126check-lxdialog := $(srctree)/$(src)/lxdialog/check-lxdialog.sh
diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c
index 6875680a8db..4da3b4adfad 100644
--- a/scripts/kconfig/conf.c
+++ b/scripts/kconfig/conf.c
@@ -32,7 +32,7 @@ enum input_mode {
32 defconfig, 32 defconfig,
33 savedefconfig, 33 savedefconfig,
34 listnewconfig, 34 listnewconfig,
35 oldnoconfig, 35 olddefconfig,
36} input_mode = oldaskconfig; 36} input_mode = oldaskconfig;
37 37
38static int indent = 1; 38static int indent = 1;
@@ -365,7 +365,7 @@ static void conf(struct menu *menu)
365 case P_MENU: 365 case P_MENU:
366 if ((input_mode == silentoldconfig || 366 if ((input_mode == silentoldconfig ||
367 input_mode == listnewconfig || 367 input_mode == listnewconfig ||
368 input_mode == oldnoconfig) && 368 input_mode == olddefconfig) &&
369 rootEntry != menu) { 369 rootEntry != menu) {
370 check_conf(menu); 370 check_conf(menu);
371 return; 371 return;
@@ -429,7 +429,7 @@ static void check_conf(struct menu *menu)
429 if (sym->name && !sym_is_choice_value(sym)) { 429 if (sym->name && !sym_is_choice_value(sym)) {
430 printf("%s%s\n", CONFIG_, sym->name); 430 printf("%s%s\n", CONFIG_, sym->name);
431 } 431 }
432 } else if (input_mode != oldnoconfig) { 432 } else if (input_mode != olddefconfig) {
433 if (!conf_cnt++) 433 if (!conf_cnt++)
434 printf(_("*\n* Restart config...\n*\n")); 434 printf(_("*\n* Restart config...\n*\n"));
435 rootEntry = menu_get_parent_menu(menu); 435 rootEntry = menu_get_parent_menu(menu);
@@ -454,7 +454,13 @@ static struct option long_opts[] = {
454 {"alldefconfig", no_argument, NULL, alldefconfig}, 454 {"alldefconfig", no_argument, NULL, alldefconfig},
455 {"randconfig", no_argument, NULL, randconfig}, 455 {"randconfig", no_argument, NULL, randconfig},
456 {"listnewconfig", no_argument, NULL, listnewconfig}, 456 {"listnewconfig", no_argument, NULL, listnewconfig},
457 {"oldnoconfig", no_argument, NULL, oldnoconfig}, 457 {"olddefconfig", no_argument, NULL, olddefconfig},
458 /*
459 * oldnoconfig is an alias of olddefconfig, because people already
460 * are dependent on its behavior(sets new symbols to their default
461 * value but not 'n') with the counter-intuitive name.
462 */
463 {"oldnoconfig", no_argument, NULL, olddefconfig},
458 {NULL, 0, NULL, 0} 464 {NULL, 0, NULL, 0}
459}; 465};
460 466
@@ -467,7 +473,8 @@ static void conf_usage(const char *progname)
467 printf(" --oldaskconfig Start a new configuration using a line-oriented program\n"); 473 printf(" --oldaskconfig Start a new configuration using a line-oriented program\n");
468 printf(" --oldconfig Update a configuration using a provided .config as base\n"); 474 printf(" --oldconfig Update a configuration using a provided .config as base\n");
469 printf(" --silentoldconfig Same as oldconfig, but quietly, additionally update deps\n"); 475 printf(" --silentoldconfig Same as oldconfig, but quietly, additionally update deps\n");
470 printf(" --oldnoconfig Same as silentoldconfig but sets new symbols to their default value\n"); 476 printf(" --olddefconfig Same as silentoldconfig but sets new symbols to their default value\n");
477 printf(" --oldnoconfig An alias of olddefconfig\n");
471 printf(" --defconfig <file> New config with default defined in <file>\n"); 478 printf(" --defconfig <file> New config with default defined in <file>\n");
472 printf(" --savedefconfig <file> Save the minimal current configuration to <file>\n"); 479 printf(" --savedefconfig <file> Save the minimal current configuration to <file>\n");
473 printf(" --allnoconfig New config where all options are answered with no\n"); 480 printf(" --allnoconfig New config where all options are answered with no\n");
@@ -520,7 +527,7 @@ int main(int ac, char **av)
520 case allmodconfig: 527 case allmodconfig:
521 case alldefconfig: 528 case alldefconfig:
522 case listnewconfig: 529 case listnewconfig:
523 case oldnoconfig: 530 case olddefconfig:
524 break; 531 break;
525 case '?': 532 case '?':
526 conf_usage(progname); 533 conf_usage(progname);
@@ -565,7 +572,7 @@ int main(int ac, char **av)
565 case oldaskconfig: 572 case oldaskconfig:
566 case oldconfig: 573 case oldconfig:
567 case listnewconfig: 574 case listnewconfig:
568 case oldnoconfig: 575 case olddefconfig:
569 conf_read(NULL); 576 conf_read(NULL);
570 break; 577 break;
571 case allnoconfig: 578 case allnoconfig:
@@ -645,7 +652,7 @@ int main(int ac, char **av)
645 /* fall through */ 652 /* fall through */
646 case oldconfig: 653 case oldconfig:
647 case listnewconfig: 654 case listnewconfig:
648 case oldnoconfig: 655 case olddefconfig:
649 case silentoldconfig: 656 case silentoldconfig:
650 /* Update until a loop caused no more changes */ 657 /* Update until a loop caused no more changes */
651 do { 658 do {
@@ -653,7 +660,7 @@ int main(int ac, char **av)
653 check_conf(&rootmenu); 660 check_conf(&rootmenu);
654 } while (conf_cnt && 661 } while (conf_cnt &&
655 (input_mode != listnewconfig && 662 (input_mode != listnewconfig &&
656 input_mode != oldnoconfig)); 663 input_mode != olddefconfig));
657 break; 664 break;
658 } 665 }
659 666
diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl
index 52b7959cd51..0ed73b5ebbf 100755
--- a/tools/testing/ktest/ktest.pl
+++ b/tools/testing/ktest/ktest.pl
@@ -1871,10 +1871,10 @@ sub make_oldconfig {
1871 apply_min_config; 1871 apply_min_config;
1872 } 1872 }
1873 1873
1874 if (!run_command "$make oldnoconfig") { 1874 if (!run_command "$make olddefconfig") {
1875 # Perhaps oldnoconfig doesn't exist in this version of the kernel 1875 # Perhaps olddefconfig doesn't exist in this version of the kernel
1876 # try a yes '' | oldconfig 1876 # try a yes '' | oldconfig
1877 doprint "oldnoconfig failed, trying yes '' | make oldconfig\n"; 1877 doprint "olddefconfig failed, trying yes '' | make oldconfig\n";
1878 run_command "yes '' | $make oldconfig" or 1878 run_command "yes '' | $make oldconfig" or
1879 dodie "failed make config oldconfig"; 1879 dodie "failed make config oldconfig";
1880 } 1880 }
@@ -1927,7 +1927,7 @@ sub build {
1927 1927
1928 # old config can ask questions 1928 # old config can ask questions
1929 if ($type eq "oldconfig") { 1929 if ($type eq "oldconfig") {
1930 $type = "oldnoconfig"; 1930 $type = "olddefconfig";
1931 1931
1932 # allow for empty configs 1932 # allow for empty configs
1933 run_command "touch $output_config"; 1933 run_command "touch $output_config";
@@ -1957,7 +1957,7 @@ sub build {
1957 load_force_config($minconfig); 1957 load_force_config($minconfig);
1958 } 1958 }
1959 1959
1960 if ($type ne "oldnoconfig") { 1960 if ($type ne "olddefconfig") {
1961 run_command "$make $type" or 1961 run_command "$make $type" or
1962 dodie "failed make config"; 1962 dodie "failed make config";
1963 } 1963 }
@@ -2456,8 +2456,7 @@ my %config_set;
2456 2456
2457# config_off holds the set of configs that the bad config had disabled. 2457# config_off holds the set of configs that the bad config had disabled.
2458# We need to record them and set them in the .config when running 2458# We need to record them and set them in the .config when running
2459# oldnoconfig, because oldnoconfig does not turn off new symbols, but 2459# olddefconfig, because olddefconfig keeps the defaults.
2460# instead just keeps the defaults.
2461my %config_off; 2460my %config_off;
2462 2461
2463# config_off_tmp holds a set of configs to turn off for now 2462# config_off_tmp holds a set of configs to turn off for now
@@ -3248,7 +3247,7 @@ sub test_this_config {
3248 } 3247 }
3249 3248
3250 # Remove this config from the list of configs 3249 # Remove this config from the list of configs
3251 # do a make oldnoconfig and then read the resulting 3250 # do a make olddefconfig and then read the resulting
3252 # .config to make sure it is missing the config that 3251 # .config to make sure it is missing the config that
3253 # we had before 3252 # we had before
3254 my %configs = %min_configs; 3253 my %configs = %min_configs;