From 332c53642557a018ca9c729a4cd284c6e34b7f72 Mon Sep 17 00:00:00 2001 From: Michael Neuling Date: Fri, 7 Jul 2006 23:28:10 +1000 Subject: [PATCH] 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 --- flattree.c | 2 ++ 1 file changed, 2 insertions(+) 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;