diff options
Diffstat (limited to 'sys/geom/concat/g_concat.c')
| -rw-r--r-- | sys/geom/concat/g_concat.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/geom/concat/g_concat.c b/sys/geom/concat/g_concat.c index 2b1cb575cac8..5461c6dd73d3 100644 --- a/sys/geom/concat/g_concat.c +++ b/sys/geom/concat/g_concat.c @@ -590,6 +590,7 @@ g_concat_add_disk(struct g_concat_softc *sc, struct g_provider *pp, u_int no) strcmp(md.md_name, sc->sc_name) != 0 || md.md_id != sc->sc_id) { G_CONCAT_DEBUG(0, "Metadata on %s changed.", pp->name); + error = EINVAL; goto fail; } @@ -645,7 +646,7 @@ g_concat_create(struct g_class *mp, const struct g_concat_metadata *md, return (NULL); } } - gp = g_new_geomf(mp, "%s", md->md_name); + gp = g_new_geom(mp, md->md_name); sc = malloc(sizeof(*sc), M_CONCAT, M_WAITOK | M_ZERO); gp->start = g_concat_start; gp->spoiled = g_concat_orphan; @@ -752,7 +753,7 @@ g_concat_taste(struct g_class *mp, struct g_provider *pp, int flags __unused) G_CONCAT_DEBUG(3, "Tasting %s.", pp->name); - gp = g_new_geomf(mp, "concat:taste"); + gp = g_new_geom(mp, "concat:taste"); gp->start = g_concat_start; gp->access = g_concat_access; gp->orphan = g_concat_orphan; @@ -1106,8 +1107,6 @@ g_concat_ctl_append(struct gctl_req *req, struct g_class *mp) gctl_error(req, "No 'arg%u' argument.", 1); goto fail; } - if (strncmp(name, "/dev/", strlen("/dev/")) == 0) - name += strlen("/dev/"); pp = g_provider_by_name(name); if (pp == NULL) { G_CONCAT_DEBUG(1, "Disk %s is invalid.", name); |
