diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-12-31 08:31:57 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-12-31 08:31:57 +0100 |
commit | a9de18eb761f7c1c860964b2e5addc1a35c7e861 (patch) | |
tree | 886e75fdfd09690cd262ca69cb7f5d1d42b48602 /arch/powerpc/boot/dtc-src/treesource.c | |
parent | b2aaf8f74cdc84a9182f6cabf198b7763bcb9d40 (diff) | |
parent | 6a94cb73064c952255336cc57731904174b2c58f (diff) |
Merge branch 'linus' into stackprotector
Conflicts:
arch/x86/include/asm/pda.h
kernel/fork.c
Diffstat (limited to 'arch/powerpc/boot/dtc-src/treesource.c')
-rw-r--r-- | arch/powerpc/boot/dtc-src/treesource.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/arch/powerpc/boot/dtc-src/treesource.c b/arch/powerpc/boot/dtc-src/treesource.c index a6a77679763..ebeb6eb2790 100644 --- a/arch/powerpc/boot/dtc-src/treesource.c +++ b/arch/powerpc/boot/dtc-src/treesource.c @@ -23,20 +23,23 @@ extern FILE *yyin; extern int yyparse(void); -extern void yyerror(char const *); 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); + srcpos_file = dtc_open_file(fname, NULL); + yyin = srcpos_file->file; if (yyparse() != 0) - return NULL; + die("Unable to parse input tree\n"); - fill_fullpaths(the_boot_info->dt, ""); + if (treesource_error) + die("Syntax error parsing input tree\n"); return the_boot_info; } @@ -144,7 +147,7 @@ static void write_propval_cells(FILE *f, struct data val) m = m->next; } - fprintf(f, "0x%x", be32_to_cpu(*cp++)); + fprintf(f, "0x%x", fdt32_to_cpu(*cp++)); if ((void *)cp >= propend) break; fprintf(f, " "); @@ -173,7 +176,7 @@ static void write_propval_bytes(FILE *f, struct data val) } fprintf(f, "%02hhx", *bp++); - if ((void *)bp >= propend) + if ((const void *)bp >= propend) break; fprintf(f, " "); } |