summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/geom/vinum/geom_vinum_share.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/sys/geom/vinum/geom_vinum_share.c b/sys/geom/vinum/geom_vinum_share.c
index 1219f0e..e87fd68 100644
--- a/sys/geom/vinum/geom_vinum_share.c
+++ b/sys/geom/vinum/geom_vinum_share.c
@@ -403,12 +403,9 @@ gv_new_drive(int max, char *token[])
break;
}
ptr = token[j];
- if (*ptr == '/') {
- ptr++;
- while (*ptr != '/')
- ptr++;
- ptr++;
- }
+
+ if (strncmp(ptr, "/dev/", 5) == 0)
+ ptr += 5;
strncpy(d->device, ptr, GV_MAXDRIVENAME);
} else {
/* We assume this is the drive name. */
OpenPOWER on IntegriCloud