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

Oleg Bulyzhin oleg at FreeBSD.org
Thu Aug 17 19:39:43 UTC 2017


Author: oleg
Date: Thu Aug 17 19:39:42 2017
New Revision: 322628
URL: https://svnweb.freebsd.org/changeset/base/322628

Log:
  Fix BSD label partition end sector calculation.
  
  Reviewed by:	ae
  MFC after:	2 weeks
  Differential Revision:	https://reviews.freebsd.org/D12066

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

Modified: head/sys/boot/common/part.c
==============================================================================
--- head/sys/boot/common/part.c	Thu Aug 17 19:16:23 2017	(r322627)
+++ head/sys/boot/common/part.c	Thu Aug 17 19:39:42 2017	(r322628)
@@ -506,7 +506,7 @@ ptable_bsdread(struct ptable *table, void *dev, diskre
 			break;
 		entry->part.start = le32toh(part->p_offset) - raw_offset;
 		entry->part.end = entry->part.start +
-		    le32toh(part->p_size) + 1;
+		    le32toh(part->p_size) - 1;
 		entry->part.type = bsd_parttype(part->p_fstype);
 		entry->part.index = i; /* starts from zero */
 		entry->type.bsd = part->p_fstype;


More information about the svn-src-head mailing list