From bd4b8491399a8df6b7aea34dc30845289f3bc0f8 Mon Sep 17 00:00:00 2001 From: phk Date: Fri, 27 Sep 2002 21:37:11 +0000 Subject: Add the new g_slice_config() call, which can add/delete/change a slice, with support for trying, doing and forcing. This will eventually replace g_slice_addslice() which gets changed from grabbing topology to requing it in this commit as well. Sponsored by: DARPA & NAI Labs. --- sys/geom/geom_gpt.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sys/geom/geom_gpt.c') diff --git a/sys/geom/geom_gpt.c b/sys/geom/geom_gpt.c index 99f67a4..3799a8b 100644 --- a/sys/geom/geom_gpt.c +++ b/sys/geom/geom_gpt.c @@ -220,9 +220,11 @@ g_gpt_taste(struct g_class *mp, struct g_provider *pp, int insist) bcopy(ent, gs->part[i], hdr->hdr_entsz); ps = (!memcmp(&ent->ent_type, &freebsd, sizeof(freebsd))) ? 's' : 'p'; + g_topology_lock(); (void)g_slice_addslice(gp, i, ent->ent_lba_start * secsz, (ent->ent_lba_end - ent->ent_lba_start + 1ULL) * secsz, "%s%c%d", gp->name, ps, i + 1); + g_topology_unlock(); npart++; } -- cgit v1.1