mirror of
https://github.com/dgibson/dtc.git
synced 2025-10-13 16:27:39 -04:00
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>
This commit is contained in:
parent
910efac4b4
commit
ad4f54ae2b
5 changed files with 8 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue