From 9ab3a1fe4a1dace4dad7f1aebcfd2c623f9fbf0a Mon Sep 17 00:00:00 2001 From: Krystian Hebel Date: Tue, 31 Jan 2023 12:54:24 +0100 Subject: util/kconfig: Fix default value getter for integer options MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CB:37152 was supposed to be uprev to Linux's kconfig, but it got this one case wrong, Linux never returned "0" [1]. As a result, when an option has default value different than 0, and it was changed to 0, savedefconfig skips saving it. However, during the build from such defconfig the option is assigned default value. TEST=Set SEABIOS_DEBUG_LEVEL to 0 and see that savedefconfig writes it to defconfig file. [1] https://github.com/torvalds/linux/commit/7cf3d73b4360e91b14326632ab1aeda4cb26308d Signed-off-by: Krystian Hebel Change-Id: I821e45dcec99904fab85f136298cbd0315237ff6 Reviewed-on: https://review.coreboot.org/c/coreboot/+/72650 Reviewed-by: Elyes Haouas Tested-by: build bot (Jenkins) Reviewed-by: Michał Żygowski --- util/kconfig/symbol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util/kconfig/symbol.c') diff --git a/util/kconfig/symbol.c b/util/kconfig/symbol.c index 7c687b0cd2..6cbbac48a1 100644 --- a/util/kconfig/symbol.c +++ b/util/kconfig/symbol.c @@ -757,7 +757,7 @@ const char *sym_get_string_default(struct symbol *sym) } case S_INT: case S_HEX: - return "0"; + return str; case S_STRING: return str; case S_UNKNOWN: -- cgit v1.2.3