diff options
Diffstat (limited to 'scripts/kconfig/conf.c')
-rw-r--r-- | scripts/kconfig/conf.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c index dffbf2ea1f9d..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)) { |
@@ -558,6 +567,27 @@ int main(int ac, char **av) | |||
558 | case ask_new: | 567 | case ask_new: |
559 | conf_read(NULL); | 568 | conf_read(NULL); |
560 | 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; | ||
561 | default: | 591 | default: |
562 | break; | 592 | break; |
563 | } | 593 | } |