dtc: fix endian issue when reading blobs
The reserve mem regions are screwy if you read a blob on x86. I'm
guessing there may be a few more of these lurking in the code.
Signed-off-by: Michael Neuling <mikey@neuling.org>
diff --git a/flattree.c b/flattree.c
index 56c1b38..f2dc4dc 100644
--- a/flattree.c
+++ b/flattree.c
@@ -619,6 +619,8 @@
p = inb->ptr;
while (1) {
flat_read_chunk(inb, &re, sizeof(re));
+ re.address = be64_to_cpu(re.address);
+ re.size = be64_to_cpu(re.size);
if (re.size == 0)
break;