svn commit: r240481 - head/sys/boot/common

Tim Kientzle kientzle at FreeBSD.org
Fri Sep 14 05:24:06 UTC 2012


Author: kientzle
Date: Fri Sep 14 05:24:06 2012
New Revision: 240481
URL: http://svn.freebsd.org/changeset/base/240481

Log:
  The MBR data is not necessarily aligned.  This is a problem on ARM.

Modified:
  head/sys/boot/common/part.c

Modified: head/sys/boot/common/part.c
==============================================================================
--- head/sys/boot/common/part.c	Fri Sep 14 01:23:28 2012	(r240480)
+++ head/sys/boot/common/part.c	Fri Sep 14 05:24:06 2012	(r240481)
@@ -661,8 +661,8 @@ ptable_open(void *dev, off_t sectors, ui
 	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 */


More information about the svn-src-all mailing list