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>
diff --git a/util/kconfig/toada.c b/util/kconfig/toada.c
index 02b6351..b531296 100644
--- a/util/kconfig/toada.c
+++ b/util/kconfig/toada.c
@@ -4,6 +4,7 @@
 #include <stdio.h>
 #include <string.h>
 #include <stdbool.h>
+#include <stdlib.h>
 
 static void print_bool(const char *const name, const bool val)
 {
@@ -107,8 +108,9 @@
 				print_dec(name, val);
 			} else {
 				fprintf(stderr,
-					"couldn't parse value '%s' for '%s'\n",
+					"toada: Error: Couldn't parse value '%s' for '%s'\n",
 					val, name);
+				exit(1);
 			}
 			continue;
 		default: