Patrick Georgi | 53ea1d4 | 2019-11-22 16:55:58 +0100 | [diff] [blame] | 1 | From 2796443d5a2194400e56e6762e0f748ed0f0470c Mon Sep 17 00:00:00 2001 |
| 2 | From: Martin Roth <martinroth@google.com> |
| 3 | Date: Wed, 10 Feb 2016 16:06:00 -0700 |
| 4 | Subject: [PATCH] util/kconfig: Ignore extra symbols in configs instead of |
| 5 | failing |
| 6 | |
| 7 | When updating an old .config file that has a symbol that has been |
| 8 | removed from the current Kconfig tree, kconfig will generate a warning |
| 9 | and fail to save the updated file. This is incredibly annoying, and |
| 10 | not the goal when trying to eliminate Kconfig warnings. |
| 11 | |
| 12 | Instead of generating a warning, just print a message that it's being |
| 13 | ignored. This will remove the offending symbol, while allowing the |
| 14 | updated config file to be saved. |
| 15 | |
| 16 | Split the change from 1 line to 3 lines to keep it at 80 characters. |
| 17 | |
| 18 | Signed-off-by: Martin Roth <martinroth@google.com> |
| 19 | --- |
| 20 | util/kconfig/confdata.c | 4 +++- |
| 21 | 1 file changed, 3 insertions(+), 1 deletion(-) |
| 22 | |
| 23 | Index: kconfig/confdata.c |
| 24 | =================================================================== |
| 25 | --- kconfig.orig/confdata.c |
| 26 | +++ kconfig/confdata.c |
Patrick Georgi | 7f93aa4 | 2023-11-20 17:58:40 +0100 | [diff] [blame] | 27 | @@ -447,7 +447,9 @@ load: |
Patrick Georgi | 53ea1d4 | 2019-11-22 16:55:58 +0100 | [diff] [blame] | 28 | 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 | } |