diff options
Diffstat (limited to 'treesource.c')
-rw-r--r-- | treesource.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/treesource.c b/treesource.c index e9bbaa5..c067b20 100644 --- a/treesource.c +++ b/treesource.c @@ -19,6 +19,7 @@ */ #include "dtc.h" +#include "srcpos.h" extern FILE *yyin; extern int yyparse(void); @@ -26,11 +27,12 @@ extern void yyerror(char const *); struct boot_info *the_boot_info; -struct boot_info *dt_from_source(FILE *f) +struct boot_info *dt_from_source(const char *fname) { the_boot_info = NULL; - yyin = f; + push_input_file(fname); + if (yyparse() != 0) return NULL; |