diff options
author | Scott Wood <scottwood@freescale.com> | 2008-01-03 17:43:33 -0600 |
---|---|---|
committer | Jon Loeliger <jdl@freescale.com> | 2008-01-04 08:21:54 -0600 |
commit | ad4f54ae2b67ddcd4d128fd4b5c21c66a640d237 (patch) | |
tree | 211909ade0f8df57886ce5ab9f872594f5fd26e1 /treesource.c | |
parent | 910efac4b49f43cb1b66eef5aa0bbd020920bf2a (diff) | |
download | dtc-ad4f54ae2b67ddcd4d128fd4b5c21c66a640d237.zip dtc-ad4f54ae2b67ddcd4d128fd4b5c21c66a640d237.tar.gz dtc-ad4f54ae2b67ddcd4d128fd4b5c21c66a640d237.tar.bz2 |
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 'treesource.c')
-rw-r--r-- | treesource.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/treesource.c b/treesource.c index e7d580f..980bda7 100644 --- a/treesource.c +++ b/treesource.c @@ -25,10 +25,12 @@ extern FILE *yyin; extern int yyparse(void); struct boot_info *the_boot_info; +int treesource_error; struct boot_info *dt_from_source(const char *fname) { the_boot_info = NULL; + treesource_error = 0; push_input_file(fname); @@ -37,6 +39,7 @@ struct boot_info *dt_from_source(const char *fname) fill_fullpaths(the_boot_info->dt, ""); + the_boot_info->error = treesource_error; return the_boot_info; } |