summaryrefslogtreecommitdiffstats
path: root/sys/geom/geom_mbr.c
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2004-07-30 19:55:12 +0000
committerpjd <pjd@FreeBSD.org>2004-07-30 19:55:12 +0000
commit0560d389916b153da1db079fea1041c3d3a55f53 (patch)
tree87e90c73383834e6d949c619b22b51234d753c8f /sys/geom/geom_mbr.c
parent4cacae89d93fa82b1a99eb4410437e09205cde41 (diff)
downloadFreeBSD-src-0560d389916b153da1db079fea1041c3d3a55f53.zip
FreeBSD-src-0560d389916b153da1db079fea1041c3d3a55f53.tar.gz
Allow to create slices on providers from class LABEL and class NOP.
This is really ugly way to do this, but there is no other way for now. It allows to mount root file system from providers which belong to those classes. Approved by: phk
Diffstat (limited to 'sys/geom/geom_mbr.c')
-rw-r--r--sys/geom/geom_mbr.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/geom/geom_mbr.c b/sys/geom/geom_mbr.c
index 9ba0815..59a699c 100644
--- a/sys/geom/geom_mbr.c
+++ b/sys/geom/geom_mbr.c
@@ -244,8 +244,12 @@ g_mbr_taste(struct g_class *mp, struct g_provider *pp, int insist)
gp->dumpconf = g_mbr_dumpconf;
gp->ioctl = g_mbr_ioctl;
do {
- if (gp->rank != 2 && insist == 0)
+ /* XXX: phk think about this! */
+ if (gp->rank != 2 &&
+ strcmp(pp->geom->class->name, "LABEL") != 0 &&
+ strcmp(pp->geom->class->name, "NOP") != 0) {
break;
+ }
error = g_getattr("GEOM::fwsectors", cp, &fwsectors);
if (error)
fwsectors = 17;
OpenPOWER on IntegriCloud