summaryrefslogtreecommitdiff
path: root/util/kconfig
diff options
context:
space:
mode:
authorMartin Roth <gaumless@gmail.com>2023-08-24 20:21:09 -0600
committerFelix Singer <service+coreboot-gerrit@felixsinger.de>2023-08-27 11:22:13 +0000
commit67448c33f195f266d763f40754824e864f88b8e8 (patch)
tree211f0c5eb5e5d94f7f5525f296c21d9f1d51d3cd /util/kconfig
parentab46c18afddc88f50edc05e923e982cb7d9c44a9 (diff)
util/kconfig: Allow toada to handle negative integers
Any builds using ADA were getting a message saying: `couldn't parse value '-1' for 'SEABIOS_DEBUG_LEVEL'` This change allows toada to parse negative integers. Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: I6507c54976b67f1ad70846b6bd6c54c861130d3d Reviewed-on: https://review.coreboot.org/c/coreboot/+/77421 Reviewed-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Diffstat (limited to 'util/kconfig')
-rw-r--r--util/kconfig/toada.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/kconfig/toada.c b/util/kconfig/toada.c
index 677aaca815..02b6351c5d 100644
--- a/util/kconfig/toada.c
+++ b/util/kconfig/toada.c
@@ -103,7 +103,7 @@ int main(int argc, char *argv[])
print_bool(name, true);
} else if (strncmp(val, "0x", 2) == 0) {
print_hex(name, val + 2);
- } else if (isdigit(val[0])) {
+ } else if (isdigit(val[0]) || (val[0] == '-' && isdigit(val[1]))) {
print_dec(name, val);
} else {
fprintf(stderr,