aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/kconfig/conf.c
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/kconfig/conf.c')
-rw-r--r--scripts/kconfig/conf.c37
1 files changed, 33 insertions, 4 deletions
diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c
index bc20cab9d0d6..8ba5d29d3d42 100644
--- a/scripts/kconfig/conf.c
+++ b/scripts/kconfig/conf.c
@@ -82,6 +82,15 @@ static void conf_askvalue(struct symbol *sym, const char *def)
82 } 82 }
83 83
84 switch (input_mode) { 84 switch (input_mode) {
85 case set_no:
86 case set_mod:
87 case set_yes:
88 case set_random:
89 if (sym_has_value(sym)) {
90 printf("%s\n", def);
91 return;
92 }
93 break;
85 case ask_new: 94 case ask_new:
86 case ask_silent: 95 case ask_silent:
87 if (sym_has_value(sym)) { 96 if (sym_has_value(sym)) {
@@ -467,15 +476,14 @@ static void check_conf(struct menu *menu)
467 return; 476 return;
468 477
469 sym = menu->sym; 478 sym = menu->sym;
470 if (sym) { 479 if (sym && !sym_has_value(sym)) {
471 if (sym_is_changable(sym) && !sym_has_value(sym)) { 480 if (sym_is_changable(sym) ||
481 (sym_is_choice(sym) && sym_get_tristate_value(sym) == yes)) {
472 if (!conf_cnt++) 482 if (!conf_cnt++)
473 printf(_("*\n* Restart config...\n*\n")); 483 printf(_("*\n* Restart config...\n*\n"));
474 rootEntry = menu_get_parent_menu(menu); 484 rootEntry = menu_get_parent_menu(menu);
475 conf(rootEntry); 485 conf(rootEntry);
476 } 486 }
477 if (sym_is_choice(sym) && sym_get_tristate_value(sym) != mod)
478 return;
479 } 487 }
480 488
481 for (child = menu->list; child; child = child->next) 489 for (child = menu->list; child; child = child->next)
@@ -559,6 +567,27 @@ int main(int ac, char **av)
559 case ask_new: 567 case ask_new:
560 conf_read(NULL); 568 conf_read(NULL);
561 break; 569 break;
570 case set_no:
571 case set_mod:
572 case set_yes:
573 case set_random:
574 name = getenv("KCONFIG_ALLCONFIG");
575 if (name && !stat(name, &tmpstat)) {
576 conf_read_simple(name);
577 break;
578 }
579 switch (input_mode) {
580 case set_no: name = "allno.config"; break;
581 case set_mod: name = "allmod.config"; break;
582 case set_yes: name = "allyes.config"; break;
583 case set_random: name = "allrandom.config"; break;
584 default: break;
585 }
586 if (!stat(name, &tmpstat))
587 conf_read_simple(name);
588 else if (!stat("all.config", &tmpstat))
589 conf_read_simple("all.config");
590 break;
562 default: 591 default:
563 break; 592 break;
564 } 593 }