From 181abccb96c60c4f64ede7ed39ae91f3ceb19e5f Mon Sep 17 00:00:00 2001 From: Tim Kientzle Date: Fri, 14 Sep 2012 05:24:06 +0000 Subject: [PATCH] The MBR data is not necessarily aligned. This is a problem on ARM. --- sys/boot/common/part.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/boot/common/part.c b/sys/boot/common/part.c index 9a30df84f84..31ea82ae083 100644 --- a/sys/boot/common/part.c +++ b/sys/boot/common/part.c @@ -661,8 +661,8 @@ ptable_open(void *dev, off_t sectors, uint16_t sectorsize, for (i = has_ext = 0; i < NDOSPART; i++) { if (dp[i].dp_typ == 0) continue; - start = le32toh(dp[i].dp_start); - end = le32toh(dp[i].dp_size); + start = le32dec(&(dp[i].dp_start)); + end = le32dec(&(dp[i].dp_size)); if (start == 0 || end == 0) continue; #if 0 /* Some BIOSes return an incorrect number of sectors */