diff options
author | phk <phk@FreeBSD.org> | 2002-12-16 22:33:27 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2002-12-16 22:33:27 +0000 |
commit | cd9caf5281a974ce67d8a16653a7751319c598f0 (patch) | |
tree | 4277245a1c753465572318c1f0e7bbd1ec48350c /sys/geom/geom_bsd.c | |
parent | d975ae88c1d27ae949bace4ebe9916bc7be8afbf (diff) | |
download | FreeBSD-src-cd9caf5281a974ce67d8a16653a7751319c598f0.zip FreeBSD-src-cd9caf5281a974ce67d8a16653a7751319c598f0.tar.gz |
Constification and some s/int/u_int/ changes.
Diffstat (limited to 'sys/geom/geom_bsd.c')
-rw-r--r-- | sys/geom/geom_bsd.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/geom/geom_bsd.c b/sys/geom/geom_bsd.c index a711bbc..7d51896 100644 --- a/sys/geom/geom_bsd.c +++ b/sys/geom/geom_bsd.c @@ -316,7 +316,7 @@ g_bsd_modify(struct g_geom *gp, struct disklabel *dl) struct partition *ppp; struct g_slicer *gsp; struct g_consumer *cp; - u_int secsize; + u_int secsize, u; off_t mediasize; /* Basic check that this is indeed a disklabel. */ @@ -385,13 +385,13 @@ g_bsd_modify(struct g_geom *gp, struct disklabel *dl) } /* Look good, go for it... */ - for (i = 0; i < gsp->nslice; i++) { - ppp = &dl->d_partitions[i]; - g_slice_config(gp, i, G_SLICE_CONFIG_SET, + for (u = 0; u < gsp->nslice; u++) { + ppp = &dl->d_partitions[u]; + g_slice_config(gp, u, G_SLICE_CONFIG_SET, (off_t)ppp->p_offset * dl->d_secsize, (off_t)ppp->p_size * dl->d_secsize, dl->d_secsize, - "%s%c", gp->name, 'a' + i); + "%s%c", gp->name, 'a' + u); } return (0); } @@ -566,7 +566,7 @@ g_bsd_hotwrite(void *arg) gsp = gp->softc; ms = gsp->softc; gsl = &gsp->slices[bp->bio_to->index]; - p = bp->bio_data + ms->labeloffset + p = (u_char*)bp->bio_data + ms->labeloffset - (bp->bio_offset + gsl->offset); g_bsd_ledec_disklabel(p, &fake.ondisk); @@ -675,7 +675,7 @@ g_bsd_start(struct bio *bp) * consumer and provider. We let g_slice_dumpconf() do most of the work. */ static void -g_bsd_dumpconf(struct sbuf *sb, char *indent, struct g_geom *gp, struct g_consumer *cp, struct g_provider *pp) +g_bsd_dumpconf(struct sbuf *sb, const char *indent, struct g_geom *gp, struct g_consumer *cp, struct g_provider *pp) { struct g_bsd_softc *ms; struct g_slicer *gsp; |