mirror of
https://github.com/dgibson/dtc.git
synced 2025-10-13 16:27:39 -04:00
Rename boot_info
struct boot_info is named that for historical reasons, and isn't particularly meaningful. Essentially it contains all the information - in "live" form from a single dts or dtb file. As we move towards support for dynamic dt overlays, that name will become increasingly bad. So, in preparation, rename it to dt_info. At the same time rename the 'the_boot_info' global to 'parser_output' since that's its actual purpose. Unfortunately we do need the global unless we switch to bison's re-entrant parser extensions, which would introduce its own complications. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
1ef86ad2c2
commit
00fbb8696b
8 changed files with 147 additions and 148 deletions
14
treesource.c
14
treesource.c
|
@ -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 char *fname)
|
|||
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)
|
||||
|
@ -263,13 +263,13 @@ static void write_tree_source_node(FILE *f, struct node *tree, int level)
|
|||
}
|
||||
|
||||
|
||||
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_info *bi)
|
|||
(unsigned long long)re->re.size);
|
||||
}
|
||||
|
||||
write_tree_source_node(f, bi->dt, 0);
|
||||
write_tree_source_node(f, dti->dt, 0);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue