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>
This commit is contained in:
Martin Roth 2023-08-24 20:21:09 -06:00 committed by Felix Singer
parent ab46c18afd
commit 67448c33f1
1 changed files with 1 additions and 1 deletions

View File

@ -103,7 +103,7 @@ int main(int argc, char *argv[])
print_bool(name, true); print_bool(name, true);
} else if (strncmp(val, "0x", 2) == 0) { } else if (strncmp(val, "0x", 2) == 0) {
print_hex(name, val + 2); print_hex(name, val + 2);
} else if (isdigit(val[0])) { } else if (isdigit(val[0]) || (val[0] == '-' && isdigit(val[1]))) {
print_dec(name, val); print_dec(name, val);
} else { } else {
fprintf(stderr, fprintf(stderr,