diff options
author | Stefan Reinauer <reinauer@chromium.org> | 2015-08-20 11:19:34 -0700 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2015-09-30 06:58:57 +0000 |
commit | 57a31317a26ff5f55638c4f3dd8d06b8a69b78f2 (patch) | |
tree | c8ac4862f908bf51f2bab03b80f6c34e8e0874f9 /util/kconfig/nconf.c | |
parent | 588ad7b5db26a88dad36e2dbecf5a4242d8410be (diff) | |
download | coreboot-57a31317a26ff5f55638c4f3dd8d06b8a69b78f2.tar.xz |
kconfig: Allow KCONFIG_STRICT outside of confdata.c
To catch dependency errors in symbol.c (such as the ones
fixed by I51b4ee326f082c6a656a813ee5772e9c34f5c343) we need
to check for global kconfig warnings before saving config
files.
This patch will produce errors for wrong dependencies and
add catching of errors to conf, nconf and mconf. Sorry,
gconf users, you will have to wait.
Change-Id: Idf7ee406ce3869941af319219aea16fab826df84
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: http://review.coreboot.org/11291
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'util/kconfig/nconf.c')
-rw-r--r-- | util/kconfig/nconf.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/util/kconfig/nconf.c b/util/kconfig/nconf.c index 984489ef2b..bc845fc6fc 100644 --- a/util/kconfig/nconf.c +++ b/util/kconfig/nconf.c @@ -646,6 +646,8 @@ static const char *set_config_filename(const char *config_filename) static int do_exit(void) { int res; + char *env; + if (!conf_get_changed()) { global_exit = 1; return 0; @@ -661,6 +663,15 @@ static int do_exit(void) return -1; } + env = getenv("KCONFIG_STRICT"); + if (env && *env && kconfig_warnings) { + btn_dialog(main_window, + _("\nWarnings encountered, and warnings are errors.\n\n"), + 1, + "<OK>"); + res = 2; + } + /* if we got here, the user really wants to exit */ switch (res) { case 0: |