mirror of https://github.com/OpenIPC/firmware.git
62 lines
1.6 KiB
Diff
62 lines
1.6 KiB
Diff
diff -drupN a/scripts/dtc/treesource.c b/scripts/dtc/treesource.c
|
|
--- a/scripts/dtc/treesource.c 2018-08-06 17:23:04.000000000 +0300
|
|
+++ b/scripts/dtc/treesource.c 2022-06-12 05:28:14.000000000 +0300
|
|
@@ -25,12 +25,12 @@ extern FILE *yyin;
|
|
extern int yyparse(void);
|
|
extern YYLTYPE yylloc;
|
|
|
|
-struct boot_info *the_boot_info;
|
|
+struct dt_info *parser_output;
|
|
bool treesource_error;
|
|
|
|
-struct boot_info *dt_from_source(const char *fname)
|
|
+struct dt_info *dt_from_source(const char *fname)
|
|
{
|
|
- the_boot_info = NULL;
|
|
+ parser_output = NULL;
|
|
treesource_error = false;
|
|
|
|
srcfile_push(fname);
|
|
@@ -43,7 +43,7 @@ struct boot_info *dt_from_source(const c
|
|
if (treesource_error)
|
|
die("Syntax error parsing input tree\n");
|
|
|
|
- return the_boot_info;
|
|
+ return parser_output;
|
|
}
|
|
|
|
static void write_prefix(FILE *f, int level)
|
|
@@ -122,7 +122,7 @@ static void write_propval_string(FILE *f
|
|
if (isprint((unsigned char)c))
|
|
fprintf(f, "%c", c);
|
|
else
|
|
- fprintf(f, "\\x%02hhx", c);
|
|
+ fprintf(f, "\\x%02hhx", (unsigned char)c);
|
|
}
|
|
}
|
|
fprintf(f, "\"");
|
|
@@ -263,13 +263,13 @@ static void write_tree_source_node(FILE
|
|
}
|
|
|
|
|
|
-void dt_to_source(FILE *f, struct boot_info *bi)
|
|
+void dt_to_source(FILE *f, struct dt_info *dti)
|
|
{
|
|
struct reserve_info *re;
|
|
|
|
fprintf(f, "/dts-v1/;\n\n");
|
|
|
|
- for (re = bi->reservelist; re; re = re->next) {
|
|
+ for (re = dti->reservelist; re; re = re->next) {
|
|
struct label *l;
|
|
|
|
for_each_label(re->labels, l)
|
|
@@ -279,6 +279,6 @@ void dt_to_source(FILE *f, struct boot_i
|
|
(unsigned long long)re->re.size);
|
|
}
|
|
|
|
- write_tree_source_node(f, bi->dt, 0);
|
|
+ write_tree_source_node(f, dti->dt, 0);
|
|
}
|
|
|