Changeset View
Changeset View
Standalone View
Standalone View
sys/geom/geom_subr.c
Show First 20 Lines • Show All 759 Lines • ▼ Show 20 Lines | |||||
struct g_provider * | struct g_provider * | ||||
g_provider_by_name(char const *arg) | g_provider_by_name(char const *arg) | ||||
{ | { | ||||
struct g_class *cp; | struct g_class *cp; | ||||
struct g_geom *gp; | struct g_geom *gp; | ||||
struct g_provider *pp, *wpp; | struct g_provider *pp, *wpp; | ||||
if (strncmp(arg, _PATH_DEV, sizeof(_PATH_DEV) - 1) == 0) | arg = g_provider_name(arg); | ||||
arg += sizeof(_PATH_DEV) - 1; | |||||
wpp = NULL; | wpp = NULL; | ||||
LIST_FOREACH(cp, &g_classes, class) { | LIST_FOREACH(cp, &g_classes, class) { | ||||
LIST_FOREACH(gp, &cp->geom, geom) { | LIST_FOREACH(gp, &cp->geom, geom) { | ||||
LIST_FOREACH(pp, &gp->provider, provider) { | LIST_FOREACH(pp, &gp->provider, provider) { | ||||
if (strcmp(arg, pp->name) != 0) | if (strcmp(arg, pp->name) != 0) | ||||
continue; | continue; | ||||
if ((gp->flags & G_GEOM_WITHER) == 0 && | if ((gp->flags & G_GEOM_WITHER) == 0 && | ||||
▲ Show 20 Lines • Show All 898 Lines • Show Last 20 Lines |