svn commit: r228061 - head/sys/geom/part

Andrey V. Elsukov ae at FreeBSD.org
Mon Nov 28 12:38:25 UTC 2011


Author: ae
Date: Mon Nov 28 12:38:24 2011
New Revision: 228061
URL: http://svn.freebsd.org/changeset/base/228061

Log:
  The size of APM could be bigger than number of already allocated entries.
  And the first usable sector should not start from the inside of APM area.
  
  MFC after:	1 month

Modified:
  head/sys/geom/part/g_part_apm.c

Modified: head/sys/geom/part/g_part_apm.c
==============================================================================
--- head/sys/geom/part/g_part_apm.c	Mon Nov 28 12:29:16 2011	(r228060)
+++ head/sys/geom/part/g_part_apm.c	Mon Nov 28 12:38:24 2011	(r228061)
@@ -443,7 +443,7 @@ g_part_apm_read(struct g_part_table *bas
 
 	table = (struct g_part_apm_table *)basetable;
 
-	basetable->gpt_first = table->self.ent_pmblkcnt + 1;
+	basetable->gpt_first = table->self.ent_size + 1;
 	basetable->gpt_last = table->ddr.ddr_blkcount - 1;
 	basetable->gpt_entries = table->self.ent_pmblkcnt - 1;
 


More information about the svn-src-head mailing list