[PATCH 3/4] of: Use dts syntax when printing devicetrees
Sascha Hauer
s.hauer at pengutronix.de
Sat Jul 27 04:32:20 EDT 2013
Our devicetree printing is close to correct dts syntax, so fix
some remaining differences:
- Use an equal sign instead of a colon to separate a poperty name and
a value
- Add a semicolon at the end of properties
- Make sure we do not print a separator for empty properties
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
drivers/of/base.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/of/base.c b/drivers/of/base.c
index 769b642..881ac3b 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -1475,9 +1475,12 @@ void of_print_nodes(struct device_node *node, int indent)
list_for_each_entry(p, &node->properties, list) {
for (i = 0; i < indent + 1; i++)
printf("\t");
- printf("%s: ", p->name);
- of_print_property(p->value, p->length);
- printf("\n");
+ printf("%s", p->name);
+ if (p->length) {
+ printf(" = ");
+ of_print_property(p->value, p->length);
+ }
+ printf(";\n");
}
list_for_each_entry(n, &node->children, parent_list) {
--
1.8.3.2
More information about the barebox
mailing list