util/kconfig: Update toada to halt on errors

The tool 'toada' which converts the Kconfig output to ada syntax keeps
running even when it can't parse something. Change that behavior to
halt, and update the error message to show where the error is coming
from.

Signed-off-by: Martin Roth <gaumless@gmail.com>
Change-Id: I29807a054581060d04b9ecbe02f2ba666c46bcf2
Reviewed-on: https://review.coreboot.org/c/coreboot/+/77422
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
This commit is contained in:
Martin Roth 2023-08-24 20:18:03 -06:00 committed by Felix Singer
parent 67448c33f1
commit a4e1066ca7
1 changed files with 3 additions and 1 deletions

View File

@ -4,6 +4,7 @@
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <stdbool.h> #include <stdbool.h>
#include <stdlib.h>
static void print_bool(const char *const name, const bool val) static void print_bool(const char *const name, const bool val)
{ {
@ -107,8 +108,9 @@ int main(int argc, char *argv[])
print_dec(name, val); print_dec(name, val);
} else { } else {
fprintf(stderr, fprintf(stderr,
"couldn't parse value '%s' for '%s'\n", "toada: Error: Couldn't parse value '%s' for '%s'\n",
val, name); val, name);
exit(1);
} }
continue; continue;
default: default: