summaryrefslogtreecommitdiff
path: root/dtc-parser.y
diff options
context:
space:
mode:
authorScott Wood <scottwood@freescale.com>2008-01-03 17:43:33 -0600
committerJon Loeliger <jdl@freescale.com>2008-01-04 08:21:54 -0600
commitad4f54ae2b67ddcd4d128fd4b5c21c66a640d237 (patch)
tree211909ade0f8df57886ce5ab9f872594f5fd26e1 /dtc-parser.y
parent910efac4b49f43cb1b66eef5aa0bbd020920bf2a (diff)
downloaddtc-ad4f54ae2b67ddcd4d128fd4b5c21c66a640d237.tar.gz
Return a non-zero exit code if an error occurs during dts parsing.
Previously, only failure to parse caused the reading of the tree to fail; semantic errors that called yyerror() but not YYERROR only emitted a message, without signalling make to stop the build. Signed-off-by: Scott Wood <scottwood@freescale.com>
Diffstat (limited to 'dtc-parser.y')
-rw-r--r--dtc-parser.y2
1 files changed, 2 insertions, 0 deletions
diff --git a/dtc-parser.y b/dtc-parser.y
index 8ed58e8..da7f6f5 100644
--- a/dtc-parser.y
+++ b/dtc-parser.y
@@ -28,6 +28,7 @@ int yylex(void);
unsigned long long eval_literal(const char *s, int base, int bits);
extern struct boot_info *the_boot_info;
+extern int treesource_error;
%}
@@ -320,6 +321,7 @@ void yyerrorf(char const *s, ...)
vfprintf(stderr, s, va);
fprintf(stderr, "\n");
+ treesource_error = 1;
va_end(va);
}