diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-28 13:37:56 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-28 13:37:56 -0400 |
commit | da85d3426f52b3728671b1b1a67c6bed16915c0e (patch) | |
tree | 167d36f5ade387e77969241f6ed9ee98eca2cf86 /scripts/kconfig | |
parent | 1347a2cebcb4cd6ca94eda0ebc8c5c6825bc4544 (diff) | |
parent | d6686da814c884e341d3bd8aa54947c91cb678be (diff) |
Merge branch 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
Pull kconfig changes from Michal Marek:
- Error handling for make KCONFIG_ALLCONFIG=<...> all*config plus a fix
for a bug that was exposed by this
- Fix for the script/config utility.
* 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
scripts/config: properly report and set string options
kbuild: all{no,yes,mod,def,rand}config only read files when instructed to.
kconfig: Add error handling to KCONFIG_ALLCONFIG
Diffstat (limited to 'scripts/kconfig')
-rw-r--r-- | scripts/kconfig/conf.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c index f208f900ed3a..0dc4a2c779b1 100644 --- a/scripts/kconfig/conf.c +++ b/scripts/kconfig/conf.c | |||
@@ -574,8 +574,15 @@ int main(int ac, char **av) | |||
574 | case alldefconfig: | 574 | case alldefconfig: |
575 | case randconfig: | 575 | case randconfig: |
576 | name = getenv("KCONFIG_ALLCONFIG"); | 576 | name = getenv("KCONFIG_ALLCONFIG"); |
577 | if (name && !stat(name, &tmpstat)) { | 577 | if (!name) |
578 | conf_read_simple(name, S_DEF_USER); | 578 | break; |
579 | if ((strcmp(name, "") != 0) && (strcmp(name, "1") != 0)) { | ||
580 | if (conf_read_simple(name, S_DEF_USER)) { | ||
581 | fprintf(stderr, | ||
582 | _("*** Can't read seed configuration \"%s\"!\n"), | ||
583 | name); | ||
584 | exit(1); | ||
585 | } | ||
579 | break; | 586 | break; |
580 | } | 587 | } |
581 | switch (input_mode) { | 588 | switch (input_mode) { |
@@ -586,10 +593,13 @@ int main(int ac, char **av) | |||
586 | case randconfig: name = "allrandom.config"; break; | 593 | case randconfig: name = "allrandom.config"; break; |
587 | default: break; | 594 | default: break; |
588 | } | 595 | } |
589 | if (!stat(name, &tmpstat)) | 596 | if (conf_read_simple(name, S_DEF_USER) && |
590 | conf_read_simple(name, S_DEF_USER); | 597 | conf_read_simple("all.config", S_DEF_USER)) { |
591 | else if (!stat("all.config", &tmpstat)) | 598 | fprintf(stderr, |
592 | conf_read_simple("all.config", S_DEF_USER); | 599 | _("*** KCONFIG_ALLCONFIG set, but no \"%s\" or \"all.config\" file found\n"), |
600 | name); | ||
601 | exit(1); | ||
602 | } | ||
593 | break; | 603 | break; |
594 | default: | 604 | default: |
595 | break; | 605 | break; |