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

[ Available lists | Index of svn-src-all | Month of Nov 2011 | Week of 28 Nov 2011 | Raw email | View thread | Wrap long lines | Reply | Tag ]
From
Andrey V. Elsukov <ae@FreeBSD.org>
Date
28 Nov 2011 12:38:24
Subject
svn commit: r228061 - head/sys/geom/part
Message-ID
201111281238.pASCcOU8091139@svn.freebsd.org


[ Hide this part ]
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;


Elapsed time: 0.120 seconds