Index: sys/geom/geom_subr.c =================================================================== --- sys/geom/geom_subr.c (wersja 238266) +++ sys/geom/geom_subr.c (kopia robocza) @@ -674,6 +674,10 @@ 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) { @@ -681,6 +685,9 @@ 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) { @@ -689,6 +696,7 @@ } } } + return (NULL); }