Changeset View
Changeset View
Standalone View
Standalone View
sys/geom/mountver/g_mountver.c
Show First 20 Lines • Show All 580 Lines • ▼ Show 20 Lines | LIST_FOREACH(gp, &mp->geom, geom) { | ||||
if (sc->sc_orphaned && strcmp(pp->name, sc->sc_provider_name) == 0) | if (sc->sc_orphaned && strcmp(pp->name, sc->sc_provider_name) == 0) | ||||
break; | break; | ||||
} | } | ||||
if (gp == NULL) | if (gp == NULL) | ||||
return (NULL); | return (NULL); | ||||
cp = LIST_FIRST(&gp->consumer); | cp = LIST_FIRST(&gp->consumer); | ||||
g_attach(cp, pp); | error = g_attach(cp, pp); | ||||
if (error != 0) { | |||||
G_MOUNTVER_DEBUG(0, "Cannot attach to %s; error = %d.", pp->name, error); | |||||
return (NULL); | |||||
} | |||||
error = g_mountver_ident_matches(gp); | error = g_mountver_ident_matches(gp); | ||||
if (error != 0) { | if (error != 0) { | ||||
g_detach(cp); | g_detach(cp); | ||||
return (NULL); | return (NULL); | ||||
} | } | ||||
if (sc->sc_access_r > 0 || sc->sc_access_w > 0 || sc->sc_access_e > 0) { | if (sc->sc_access_r > 0 || sc->sc_access_w > 0 || sc->sc_access_e > 0) { | ||||
error = g_access(cp, sc->sc_access_r, sc->sc_access_w, sc->sc_access_e); | error = g_access(cp, sc->sc_access_r, sc->sc_access_w, sc->sc_access_e); | ||||
if (error != 0) { | if (error != 0) { | ||||
▲ Show 20 Lines • Show All 96 Lines • Show Last 20 Lines |