diff options
author | pjd <pjd@FreeBSD.org> | 2006-07-13 20:37:59 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2006-07-13 20:37:59 +0000 |
commit | 27c2ca32122c31456d60bac89aae091ff18728b0 (patch) | |
tree | 2ecc631709ebc0a17d4e5bd6f3aff8e35ccd458c /sys/geom/raid3 | |
parent | 03e0206d84485a74106dd8900455d6656c09a6f2 (diff) | |
download | FreeBSD-src-27c2ca32122c31456d60bac89aae091ff18728b0.zip FreeBSD-src-27c2ca32122c31456d60bac89aae091ff18728b0.tar.gz |
Always allow to specify components with /dev/ prefix.
MFC after: 3 days
Diffstat (limited to 'sys/geom/raid3')
-rw-r--r-- | sys/geom/raid3/g_raid3_ctl.c | 4 |
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 f687f56..2e80390 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) { |