summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/geom/geom_subr.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/geom/geom_subr.c b/sys/geom/geom_subr.c
index 2126ed7..fb8e69a 100644
--- a/sys/geom/geom_subr.c
+++ b/sys/geom/geom_subr.c
@@ -686,6 +686,10 @@ g_resize_provider(struct g_provider *pp, off_t size)
g_post_event(g_resize_provider_event, hh, M_WAITOK, NULL);
}
+#ifndef _PATH_DEV
+#define _PATH_DEV "/dev/"
+#endif
+
struct g_provider *
g_provider_by_name(char const *arg)
{
@@ -693,6 +697,9 @@ g_provider_by_name(char const *arg)
struct g_geom *gp;
struct g_provider *pp;
+ if (strncmp(arg, _PATH_DEV, sizeof(_PATH_DEV) - 1) == 0)
+ arg += sizeof(_PATH_DEV) - 1;
+
LIST_FOREACH(cp, &g_classes, class) {
LIST_FOREACH(gp, &cp->geom, geom) {
LIST_FOREACH(pp, &gp->provider, provider) {
@@ -701,6 +708,7 @@ g_provider_by_name(char const *arg)
}
}
}
+
return (NULL);
}
OpenPOWER on IntegriCloud