[Crosstoolchain-logs] [device-tree-compiler] 177/357: dtc: Make -Idts -Odts preserve node/property labels
Hector Oron
zumbi at moszumanska.debian.org
Thu Dec 8 17:06:11 UTC 2016
This is an automated email from the git hooks/post-receive script.
zumbi pushed a commit to branch upstream/1.3.x
in repository device-tree-compiler.
commit 02563ad023122ac2dbd6de6169eaf4b911ddcc7e
Author: David Gibson <david at gibson.dropbear.id.au>
Date: Fri Nov 2 16:10:30 2007 +1100
dtc: Make -Idts -Odts preserve node/property labels
This patch changes -Odts mode output so that labels on properties,
nodes and memreserve entries in input source are preserved in the
output.
Preserving labels within property values is trickier - another patch
coming later.
Signed-off-by: David Gibson <david at gibson.dropbear.id.au>
---
treesource.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/treesource.c b/treesource.c
index f62041f..376ebc8 100644
--- a/treesource.c
+++ b/treesource.c
@@ -176,6 +176,8 @@ static void write_tree_source_node(FILE *f, struct node *tree, int level)
struct node *child;
write_prefix(f, level);
+ if (tree->label)
+ fprintf(f, "%s: ", tree->label);
if (tree->name && (*tree->name))
fprintf(f, "%s {\n", tree->name);
else
@@ -184,8 +186,10 @@ static void write_tree_source_node(FILE *f, struct node *tree, int level)
for_each_property(tree, prop) {
enum proptype type;
- write_prefix(f, level);
- fprintf(f, "\t%s", prop->name);
+ write_prefix(f, level+1);
+ if (prop->label)
+ fprintf(f, "%s: ", prop->label);
+ fprintf(f, "%s", prop->name);
type = guess_type(prop);
switch (type) {
@@ -220,6 +224,8 @@ void dt_to_source(FILE *f, struct boot_info *bi)
struct reserve_info *re;
for (re = bi->reservelist; re; re = re->next) {
+ if (re->label)
+ fprintf(f, "%s: ", re->label);
fprintf(f, "/memreserve/\t%016llx-%016llx;\n",
(unsigned long long)re->re.address,
(unsigned long long)(re->re.address + re->re.size - 1));
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/crosstoolchain/device-tree-compiler.git
More information about the Crosstoolchain-logs
mailing list