diff options
author | phk <phk@FreeBSD.org> | 2002-12-16 23:08:48 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2002-12-16 23:08:48 +0000 |
commit | 3cf4280261e4479a41062ad7f2038dafb3594041 (patch) | |
tree | 53683765dc78acc5e28c69c1323c6d247e1c4ac7 /sys/geom/geom_slice.c | |
parent | 168664d0ec45abb96a9f3ae963ff8f67fb41d190 (diff) | |
download | FreeBSD-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_slice.c')
-rw-r--r-- | sys/geom/geom_slice.c | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/sys/geom/geom_slice.c b/sys/geom/geom_slice.c index cbe3749..51d3ffa 100644 --- a/sys/geom/geom_slice.c +++ b/sys/geom/geom_slice.c @@ -384,38 +384,6 @@ g_slice_conf_hot(struct g_geom *gp, u_int idx, off_t offset, off_t length) return (0); } -struct g_provider * -g_slice_addslice(struct g_geom *gp, int idx, off_t offset, off_t length, u_int sectorsize, const char *fmt, ...) -{ - struct g_provider *pp; - struct g_slicer *gsp; - va_list ap; - struct sbuf *sb; - - g_trace(G_T_TOPOLOGY, "g_slice_addslice()"); - g_topology_assert(); - gsp = gp->softc; - va_start(ap, fmt); - sb = sbuf_new(NULL, NULL, 0, SBUF_AUTOEXTEND); - sbuf_vprintf(sb, fmt, ap); - sbuf_finish(sb); - pp = g_new_providerf(gp, sbuf_data(sb)); - - pp->index = idx; - gsp->slices[idx].length = length; - gsp->slices[idx].offset = offset; - gsp->slices[idx].provider = pp; - gsp->slices[idx].sectorsize = sectorsize; - pp->mediasize = gsp->slices[idx].length; - pp->sectorsize = gsp->slices[idx].sectorsize; - sbuf_delete(sb); - if (bootverbose) - printf("GEOM: Add %s, start %jd length %jd end %jd\n", - pp->name, (intmax_t)offset, (intmax_t)length, - (intmax_t)(offset + length - 1)); - return(pp); -} - struct g_geom * g_slice_new(struct g_class *mp, u_int slices, struct g_provider *pp, struct g_consumer **cpp, void *extrap, int extra, g_slice_start_t *start) { |