summaryrefslogtreecommitdiffstats
path: root/sys/geom
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2015-04-09 10:10:05 +0000
committermav <mav@FreeBSD.org>2015-04-09 10:10:05 +0000
commit5f22f76484ca0d7ab92d0d4190aafcb0d796a0f3 (patch)
tree0d36e36d8e52fbecb3ae89e61c842c29ceb5de3a /sys/geom
parent2b74acfbccc9df3abd609f0c8106be951ea02875 (diff)
downloadFreeBSD-src-5f22f76484ca0d7ab92d0d4190aafcb0d796a0f3.zip
FreeBSD-src-5f22f76484ca0d7ab92d0d4190aafcb0d796a0f3.tar.gz
MFC r280687: Make GEOM_PART work in presence of previous withered self.
Diffstat (limited to 'sys/geom')
-rw-r--r--sys/geom/part/g_part.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/geom/part/g_part.c b/sys/geom/part/g_part.c
index b3e9f27..c64d98a 100644
--- a/sys/geom/part/g_part.c
+++ b/sys/geom/part/g_part.c
@@ -451,7 +451,8 @@ g_part_find_geom(const char *name)
{
struct g_geom *gp;
LIST_FOREACH(gp, &g_part_class.geom, geom) {
- if (!strcmp(name, gp->name))
+ if ((gp->flags & G_GEOM_WITHER) == 0 &&
+ strcmp(name, gp->name) == 0)
break;
}
return (gp);
@@ -473,10 +474,6 @@ g_part_parm_geom(struct gctl_req *req, const char *name, struct g_geom **v)
gctl_error(req, "%d %s '%s'", EINVAL, name, gname);
return (EINVAL);
}
- if ((gp->flags & G_GEOM_WITHER) != 0) {
- gctl_error(req, "%d %s", ENXIO, gname);
- return (ENXIO);
- }
*v = gp;
return (0);
}
OpenPOWER on IntegriCloud