Deleted Added
full compact
35c35
< * $FreeBSD: head/sys/geom/geom_slice.c 107832 2002-12-13 21:31:13Z phk $
---
> * $FreeBSD: head/sys/geom/geom_slice.c 107953 2002-12-16 22:33:27Z phk $
85c85,86
< int error, i;
---
> int error;
> u_int u;
97,98c98,99
< for (i = 0; i < gsp->nslice; i++) {
< gsl2 = &gsp->slices[i];
---
> for (u = 0; u < gsp->nslice; u++) {
> gsl2 = &gsp->slices[u];
101c102
< if (i == pp->index)
---
> if (u == pp->index)
132c133
< int index;
---
> int idx;
140,141c141,142
< index = bp->bio_to->index;
< gsl = &gsp->slices[index];
---
> idx = bp->bio_to->index;
> gsl = &gsp->slices[idx];
165c166
< int index, error;
---
> int idx, error;
173,174c174,175
< index = pp->index;
< gsl = &gsp->slices[index];
---
> idx = pp->index;
> gsl = &gsp->slices[idx];
236,238c237,239
< gkd->offset += gsp->slices[index].offset;
< if (gkd->length > gsp->slices[index].length)
< gkd->length = gsp->slices[index].length;
---
> gkd->offset += gsp->slices[idx].offset;
> if (gkd->length > gsp->slices[idx].length)
> gkd->length = gsp->slices[idx].length;
257c258
< g_slice_dumpconf(struct sbuf *sb, char *indent, struct g_geom *gp, struct g_consumer *cp, struct g_provider *pp)
---
> g_slice_dumpconf(struct sbuf *sb, const char *indent, struct g_geom *gp, struct g_consumer *cp, struct g_provider *pp)
286c287
< g_slice_config(struct g_geom *gp, u_int index, int how, off_t offset, off_t length, u_int sectorsize, char *fmt, ...)
---
> g_slice_config(struct g_geom *gp, u_int idx, int how, off_t offset, off_t length, u_int sectorsize, const char *fmt, ...)
296c297
< gp->name, index, how);
---
> gp->name, idx, how);
300c301
< if (index >= gsp->nslice)
---
> if (idx >= gsp->nslice)
302c303
< gsl = &gsp->slices[index];
---
> gsl = &gsp->slices[idx];
347c348
< pp->index = index;
---
> pp->index = idx;
358c359
< g_slice_conf_hot(struct g_geom *gp, u_int index, off_t offset, off_t length)
---
> g_slice_conf_hot(struct g_geom *gp, u_int idx, off_t offset, off_t length)
367,368c368,369
< if(index >= gsp->nhot) {
< gsl2 = g_malloc((index + 1) * sizeof *gsl2, M_WAITOK | M_ZERO);
---
> if(idx >= gsp->nhot) {
> gsl2 = g_malloc((idx + 1) * sizeof *gsl2, M_WAITOK | M_ZERO);
375c376
< gsp->nhot = index + 1;
---
> gsp->nhot = idx + 1;
379c380
< gp->name, index, (intmax_t)offset, (intmax_t)length,
---
> gp->name, idx, (intmax_t)offset, (intmax_t)length,
381,382c382,383
< gsl[index].offset = offset;
< gsl[index].length = length;
---
> gsl[idx].offset = offset;
> gsl[idx].length = length;
387c388
< g_slice_addslice(struct g_geom *gp, int index, off_t offset, off_t length, u_int sectorsize, char *fmt, ...)
---
> g_slice_addslice(struct g_geom *gp, int idx, off_t offset, off_t length, u_int sectorsize, const char *fmt, ...)
403,409c404,410
< pp->index = index;
< gsp->slices[index].length = length;
< gsp->slices[index].offset = offset;
< gsp->slices[index].provider = pp;
< gsp->slices[index].sectorsize = sectorsize;
< pp->mediasize = gsp->slices[index].length;
< pp->sectorsize = gsp->slices[index].sectorsize;
---
> 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;