diff options
author | phk <phk@FreeBSD.org> | 2002-04-04 09:54:13 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2002-04-04 09:54:13 +0000 |
commit | fd177bc9595b9076f3b0010d5c8d15d431382251 (patch) | |
tree | c6baa9879fc1591197958488bdcaff9076c51439 /sys/geom/geom_subr.c | |
parent | 069aa8e324a61f68be3ba5e22bf5fff15ddf4f09 (diff) | |
download | FreeBSD-src-fd177bc9595b9076f3b0010d5c8d15d431382251.zip FreeBSD-src-fd177bc9595b9076f3b0010d5c8d15d431382251.tar.gz |
Move access and orphan member functions from class to geom.
Sponsored by: DARPA & NAI Labs
Diffstat (limited to 'sys/geom/geom_subr.c')
-rw-r--r-- | sys/geom/geom_subr.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/geom/geom_subr.c b/sys/geom/geom_subr.c index 2280efe..b9c6236 100644 --- a/sys/geom/geom_subr.c +++ b/sys/geom/geom_subr.c @@ -136,8 +136,9 @@ g_new_consumer(struct g_geom *gp) struct g_consumer *cp; g_topology_assert(); - KASSERT(gp->class->orphan != NULL, - ("g_new_consumer on class(%s) without orphan", gp->class->name)); + KASSERT(gp->orphan != NULL, + ("g_new_consumer on geom(%s) (class %s) without orphan", + gp->name, gp->class->name)); cp = g_malloc(sizeof *cp, M_WAITOK | M_ZERO); cp->geom = gp; @@ -378,7 +379,7 @@ g_access_rel(struct g_consumer *cp, int dcr, int dcw, int dce) KASSERT(cp->acr + dcr >= 0, ("access resulting in negative acr")); KASSERT(cp->acw + dcw >= 0, ("access resulting in negative acw")); KASSERT(cp->ace + dce >= 0, ("access resulting in negative ace")); - KASSERT(pp->geom->class->access != NULL, ("NULL class->access")); + KASSERT(pp->geom->access != NULL, ("NULL geom->access")); /* * If our class cares about being spoiled, and we have been, we @@ -431,7 +432,7 @@ g_access_rel(struct g_consumer *cp, int dcr, int dcw, int dce) else if (pp->acw != 0 && pp->acw == -dcw && !(pp->geom->flags & G_GEOM_WITHER)) g_post_event(EV_NEW_PROVIDER, NULL, NULL, pp, NULL); - error = pp->geom->class->access(pp, dcr, dcw, dce); + error = pp->geom->access(pp, dcr, dcw, dce); if (!error) { pp->acr += dcr; pp->acw += dcw; |