blob: c05e4a64bfc54a7e31309773f8fbeeb9b53af337 [file] [log] [blame]
Patrick Georgi53ea1d42019-11-22 16:55:58 +01001From 2796443d5a2194400e56e6762e0f748ed0f0470c Mon Sep 17 00:00:00 2001
2From: Martin Roth <martinroth@google.com>
3Date: Wed, 10 Feb 2016 16:06:00 -0700
4Subject: [PATCH] util/kconfig: Ignore extra symbols in configs instead of
5 failing
6
7When updating an old .config file that has a symbol that has been
8removed from the current Kconfig tree, kconfig will generate a warning
9and fail to save the updated file. This is incredibly annoying, and
10not the goal when trying to eliminate Kconfig warnings.
11
12Instead of generating a warning, just print a message that it's being
13ignored. This will remove the offending symbol, while allowing the
14updated config file to be saved.
15
16Split the change from 1 line to 3 lines to keep it at 80 characters.
17
18Signed-off-by: Martin Roth <martinroth@google.com>
19---
20 util/kconfig/confdata.c | 4 +++-
21 1 file changed, 3 insertions(+), 1 deletion(-)
22
23Index: kconfig/confdata.c
24===================================================================
25--- kconfig.orig/confdata.c
26+++ kconfig/confdata.c
Patrick Georgi7f93aa42023-11-20 17:58:40 +010027@@ -447,7 +447,9 @@ load:
Patrick Georgi53ea1d42019-11-22 16:55:58 +010028 if (def == S_DEF_USER) {
29 sym = sym_find(line + 2 + strlen(CONFIG_));
30 if (!sym) {
31- conf_warning("trying to assign non-existent symbol %s", line + strlen(CONFIG_));
32+ conf_message(
33+ "ignoring nonexistent symbol %s",
34+ line + 2 + strlen(CONFIG_));
35 conf_set_changed(true);
36 continue;
37 }