aboutsummaryrefslogtreecommitdiff
path: root/treesource.c
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2016-05-31 11:58:42 +1000
committerDavid Gibson <david@gibson.dropbear.id.au>2016-12-09 16:30:43 +1100
commit00fbb8696b665ab138406cc9522793f2096031a0 (patch)
tree9a90007c2f98ea3b0ffccebafda5f358fefd3566 /treesource.c
parent1ef86ad2c24f67567b1021ca5cb84bea82749f88 (diff)
downloaddtc-00fbb8696b665ab138406cc9522793f2096031a0.zip
dtc-00fbb8696b665ab138406cc9522793f2096031a0.tar.gz
dtc-00fbb8696b665ab138406cc9522793f2096031a0.tar.bz2
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>
Diffstat (limited to 'treesource.c')
-rw-r--r--treesource.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/treesource.c b/treesource.c
index a55d1d1..c9d8967 100644
--- a/treesource.c
+++ b/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);
}