@@ -32,7 +32,7 @@ enum input_mode {
32
32
defconfig ,
33
33
savedefconfig ,
34
34
listnewconfig ,
35
- oldnoconfig ,
35
+ olddefconfig ,
36
36
} input_mode = oldaskconfig ;
37
37
38
38
static int indent = 1 ;
@@ -365,7 +365,7 @@ static void conf(struct menu *menu)
365
365
case P_MENU :
366
366
if ((input_mode == silentoldconfig ||
367
367
input_mode == listnewconfig ||
368
- input_mode == oldnoconfig ) &&
368
+ input_mode == olddefconfig ) &&
369
369
rootEntry != menu ) {
370
370
check_conf (menu );
371
371
return ;
@@ -429,7 +429,7 @@ static void check_conf(struct menu *menu)
429
429
if (sym -> name && !sym_is_choice_value (sym )) {
430
430
printf ("%s%s\n" , CONFIG_ , sym -> name );
431
431
}
432
- } else if (input_mode != oldnoconfig ) {
432
+ } else if (input_mode != olddefconfig ) {
433
433
if (!conf_cnt ++ )
434
434
printf (_ ("*\n* Restart config...\n*\n" ));
435
435
rootEntry = menu_get_parent_menu (menu );
@@ -454,7 +454,13 @@ static struct option long_opts[] = {
454
454
{"alldefconfig" , no_argument , NULL , alldefconfig },
455
455
{"randconfig" , no_argument , NULL , randconfig },
456
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
464
{NULL , 0 , NULL , 0 }
459
465
};
460
466
@@ -467,7 +473,8 @@ static void conf_usage(const char *progname)
467
473
printf (" --oldaskconfig Start a new configuration using a line-oriented program\n" );
468
474
printf (" --oldconfig Update a configuration using a provided .config as base\n" );
469
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
478
printf (" --defconfig <file> New config with default defined in <file>\n" );
472
479
printf (" --savedefconfig <file> Save the minimal current configuration to <file>\n" );
473
480
printf (" --allnoconfig New config where all options are answered with no\n" );
@@ -520,7 +527,7 @@ int main(int ac, char **av)
520
527
case allmodconfig :
521
528
case alldefconfig :
522
529
case listnewconfig :
523
- case oldnoconfig :
530
+ case olddefconfig :
524
531
break ;
525
532
case '?' :
526
533
conf_usage (progname );
@@ -565,7 +572,7 @@ int main(int ac, char **av)
565
572
case oldaskconfig :
566
573
case oldconfig :
567
574
case listnewconfig :
568
- case oldnoconfig :
575
+ case olddefconfig :
569
576
conf_read (NULL );
570
577
break ;
571
578
case allnoconfig :
@@ -645,15 +652,15 @@ int main(int ac, char **av)
645
652
/* fall through */
646
653
case oldconfig :
647
654
case listnewconfig :
648
- case oldnoconfig :
655
+ case olddefconfig :
649
656
case silentoldconfig :
650
657
/* Update until a loop caused no more changes */
651
658
do {
652
659
conf_cnt = 0 ;
653
660
check_conf (& rootmenu );
654
661
} while (conf_cnt &&
655
662
(input_mode != listnewconfig &&
656
- input_mode != oldnoconfig ));
663
+ input_mode != olddefconfig ));
657
664
break ;
658
665
}
659
666
0 commit comments