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
This commit is contained in:
Andrey V. Elsukov 2011-11-28 12:38:24 +00:00
parent acca521c82
commit 64c4a83782

View File

@ -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;