summaryrefslogtreecommitdiff
path: root/flattree.c
diff options
context:
space:
mode:
authorMichael Neuling <mikey@neuling.org>2006-07-07 23:28:10 +1000
committerJon Loeliger <jdl@freescale.com>2006-07-07 09:30:44 -0500
commit332c53642557a018ca9c729a4cd284c6e34b7f72 (patch)
tree3bb500c5c6860984ec76af268f7dfdbf9ce9c534 /flattree.c
parenta73b7d43d4f60e76d82018fb9a4d137b089a1325 (diff)
downloaddtc-332c53642557a018ca9c729a4cd284c6e34b7f72.tar.gz
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>
Diffstat (limited to 'flattree.c')
-rw-r--r--flattree.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/flattree.c b/flattree.c
index 56c1b38..f2dc4dc 100644
--- a/flattree.c
+++ b/flattree.c
@@ -619,6 +619,8 @@ static struct reserve_info *flat_read_mem_reserve(struct inbuf *inb)
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;