From a267596c2aa9567b90bbb57c35c4720ce61b3f5f Mon Sep 17 00:00:00 2001 From: ae Date: Mon, 28 Nov 2011 12:38:24 +0000 Subject: [PATCH] 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 --- sys/geom/part/g_part_apm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/geom/part/g_part_apm.c b/sys/geom/part/g_part_apm.c index cd318c75f7fd..db789c17276c 100644 --- a/sys/geom/part/g_part_apm.c +++ b/sys/geom/part/g_part_apm.c @@ -443,7 +443,7 @@ g_part_apm_read(struct g_part_table *basetable, struct g_consumer *cp) 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;