summaryrefslogtreecommitdiff
path: root/util/kconfig
diff options
context:
space:
mode:
authorKrystian Hebel <krystian.hebel@3mdeb.com>2023-01-31 12:54:24 +0100
committerFelix Held <felix-coreboot@felixheld.de>2023-05-22 12:34:50 +0000
commit9ab3a1fe4a1dace4dad7f1aebcfd2c623f9fbf0a (patch)
tree55d6f4fec9f78c576730db128a8429342254e6b4 /util/kconfig
parent050b911141a2beaa17f3b49eb02bbda3bbef51ae (diff)
util/kconfig: Fix default value getter for integer options
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 <krystian.hebel@3mdeb.com> Change-Id: I821e45dcec99904fab85f136298cbd0315237ff6 Reviewed-on: https://review.coreboot.org/c/coreboot/+/72650 Reviewed-by: Elyes Haouas <ehaouas@noos.fr> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Diffstat (limited to 'util/kconfig')
-rw-r--r--util/kconfig/symbol.c2
1 files changed, 1 insertions, 1 deletions
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: