summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2005-03-14 15:22:18 +0000
committerphk <phk@FreeBSD.org>2005-03-14 15:22:18 +0000
commitddc0cb6817f86bd4f73d449193a4e250936085b4 (patch)
tree204e8cc421c73244dc2cc5021f46f94f23230748
parent2762d2e8a6606c8096a4476cf6b17ab25d567fbf (diff)
downloadFreeBSD-src-ddc0cb6817f86bd4f73d449193a4e250936085b4.zip
FreeBSD-src-ddc0cb6817f86bd4f73d449193a4e250936085b4.tar.gz
Do not attach MBR on top of an MBR. This removes some confusing
slice names on disks with extended partitions. Spotted on: Mother-in-laws computer.
-rw-r--r--sys/geom/geom_mbr.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/geom/geom_mbr.c b/sys/geom/geom_mbr.c
index 868c0e0..b7d832b 100644
--- a/sys/geom/geom_mbr.c
+++ b/sys/geom/geom_mbr.c
@@ -267,6 +267,8 @@ g_mbr_taste(struct g_class *mp, struct g_provider *pp, int insist)
g_trace(G_T_TOPOLOGY, "mbr_taste(%s,%s)", mp->name, pp->name);
g_topology_assert();
+ if (!strcmp(pp->geom->class->name, MBR_CLASS_NAME))
+ return (NULL);
gp = g_slice_new(mp, NDOSPART, pp, &cp, &ms, sizeof *ms, g_mbr_start);
if (gp == NULL)
return (NULL);
OpenPOWER on IntegriCloud