summaryrefslogtreecommitdiff
path: root/sys/geom/raid3/g_raid3_ctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/geom/raid3/g_raid3_ctl.c')
-rw-r--r--sys/geom/raid3/g_raid3_ctl.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/geom/raid3/g_raid3_ctl.c b/sys/geom/raid3/g_raid3_ctl.c
index f687f56f30cf..2e80390d050b 100644
--- a/sys/geom/raid3/g_raid3_ctl.c
+++ b/sys/geom/raid3/g_raid3_ctl.c
@@ -76,6 +76,8 @@ g_raid3_find_disk(struct g_raid3_softc *sc, const char *name)
u_int n;
sx_assert(&sc->sc_lock, SX_XLOCKED);
+ if (strncmp(name, "/dev/", 5) == 0)
+ name += 5;
for (n = 0; n < sc->sc_ndisks; n++) {
disk = &sc->sc_disks[n];
if (disk->d_state == G_RAID3_DISK_STATE_NODISK)
@@ -401,6 +403,8 @@ g_raid3_ctl_insert(struct gctl_req *req, struct g_class *mp)
gctl_error(req, "No '%s' argument.", "no");
return;
}
+ if (strncmp(name, "/dev/", 5) == 0)
+ name += 5;
g_topology_lock();
pp = g_provider_by_name(name);
if (pp == NULL) {