summaryrefslogtreecommitdiffstats
path: root/sys/geom/geom_sunlabel.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2002-12-16 23:08:48 +0000
committerphk <phk@FreeBSD.org>2002-12-16 23:08:48 +0000
commit3cf4280261e4479a41062ad7f2038dafb3594041 (patch)
tree53683765dc78acc5e28c69c1323c6d247e1c4ac7 /sys/geom/geom_sunlabel.c
parent168664d0ec45abb96a9f3ae963ff8f67fb41d190 (diff)
downloadFreeBSD-src-3cf4280261e4479a41062ad7f2038dafb3594041.zip
FreeBSD-src-3cf4280261e4479a41062ad7f2038dafb3594041.tar.gz
Get rid of g_slice_addslice() and use g_slice_config() instead.
Tested with: i386 + src/tools/regression/geom
Diffstat (limited to 'sys/geom/geom_sunlabel.c')
-rw-r--r--sys/geom/geom_sunlabel.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/sys/geom/geom_sunlabel.c b/sys/geom/geom_sunlabel.c
index 576a35b0..7d1ef3a 100644
--- a/sys/geom/geom_sunlabel.c
+++ b/sys/geom/geom_sunlabel.c
@@ -97,7 +97,6 @@ g_sunlabel_taste(struct g_class *mp, struct g_provider *pp, int flags)
{
struct g_geom *gp;
struct g_consumer *cp;
- struct g_provider *pp2;
int error, i, npart;
u_char *buf;
struct g_sunlabel_softc *ms;
@@ -174,22 +173,22 @@ g_sunlabel_taste(struct g_class *mp, struct g_provider *pp, int flags)
continue;
npart++;
g_topology_lock();
- pp2 = g_slice_addslice(gp, i,
+ g_slice_config(gp, i, G_SLICE_CONFIG_SET,
((off_t)v * csize) << 9ULL,
((off_t)u) << 9ULL,
sectorsize,
"%s%c", pp->name, 'a' + i);
g_topology_unlock();
- g_error_provider(pp2, 0);
}
break;
}
g_topology_lock();
- error = g_access_rel(cp, -1, 0, 0);
- if (npart > 0)
- return (gp);
- g_std_spoiled(cp);
- return (NULL);
+ g_access_rel(cp, -1, 0, 0);
+ if (LIST_EMPTY(&gp->provider)) {
+ g_std_spoiled(cp);
+ return (NULL);
+ }
+ return (gp);
}
static struct g_class g_sunlabel_class = {
OpenPOWER on IntegriCloud