diff options
Diffstat (limited to 'sys/geom')
-rw-r--r-- | sys/geom/bde/g_bde.c | 6 | ||||
-rw-r--r-- | sys/geom/geom_aes.c | 4 | ||||
-rw-r--r-- | sys/geom/geom_apple.c | 9 | ||||
-rw-r--r-- | sys/geom/geom_gpt.c | 7 |
4 files changed, 2 insertions, 24 deletions
diff --git a/sys/geom/bde/g_bde.c b/sys/geom/bde/g_bde.c index e2b9bc0..5e10ba3 100644 --- a/sys/geom/bde/g_bde.c +++ b/sys/geom/bde/g_bde.c @@ -51,13 +51,7 @@ static void g_bde_start(struct bio *bp) { - struct g_geom *gp; - struct g_consumer *cp; - struct g_bde_softc *sc; - gp = bp->bio_to->geom; - cp = LIST_FIRST(&gp->consumer); - sc = gp->softc; switch (bp->bio_cmd) { case BIO_DELETE: case BIO_READ: diff --git a/sys/geom/geom_aes.c b/sys/geom/geom_aes.c index aa580cf..7698364 100644 --- a/sys/geom/geom_aes.c +++ b/sys/geom/geom_aes.c @@ -160,11 +160,7 @@ g_aes_read_done(struct bio *bp) static void g_aes_write_done(struct bio *bp) { - struct g_aes_softc *sc; - struct g_geom *gp; - gp = bp->bio_to->geom; - sc = gp->softc; bzero(bp->bio_data, bp->bio_length); /* destroy evidence */ g_free(bp->bio_data); g_std_done(bp); diff --git a/sys/geom/geom_apple.c b/sys/geom/geom_apple.c index b8cd8d5..8146d67 100644 --- a/sys/geom/geom_apple.c +++ b/sys/geom/geom_apple.c @@ -92,13 +92,11 @@ g_apple_start(struct bio *bp) { struct g_provider *pp; struct g_geom *gp; - struct g_apm_softc *mp; struct g_slicer *gsp; pp = bp->bio_to; gp = pp->geom; gsp = gp->softc; - mp = gsp->softc; if (bp->bio_cmd == BIO_GETATTR) { if (g_handleattr_off_t(bp, "APM::offset", gsp->slices[pp->index].offset)) @@ -145,9 +143,8 @@ g_apple_taste(struct g_class *mp, struct g_provider *pp, int insist) { struct g_geom *gp; struct g_consumer *cp; - int error, i, npart; + int error, i; struct g_apple_softc *ms; - struct g_slicer *gsp; struct apm_partition *apm; u_int sectorsize; u_char *buf; @@ -157,10 +154,8 @@ g_apple_taste(struct g_class *mp, struct g_provider *pp, int insist) gp = g_slice_new(mp, NAPMPART, pp, &cp, &ms, sizeof *ms, g_apple_start); if (gp == NULL) return (NULL); - gsp = gp->softc; g_topology_unlock(); gp->dumpconf = g_apple_dumpconf; - npart = 0; do { if (gp->rank != 2 && insist == 0) break; @@ -218,7 +213,6 @@ g_apple_taste(struct g_class *mp, struct g_provider *pp, int insist) &ms->apmpart[i]); } - npart = 0; for (i = 0; i < NAPMPART; i++) { apm = &ms->apmpart[i]; @@ -237,7 +231,6 @@ g_apple_taste(struct g_class *mp, struct g_provider *pp, int insist) gp->name); /* g_apple_print(i, dp + i); */ } - npart++; g_topology_lock(); g_slice_config(gp, i, G_SLICE_CONFIG_SET, (off_t)apm->am_start << 9ULL, diff --git a/sys/geom/geom_gpt.c b/sys/geom/geom_gpt.c index e468598..5fdf74d 100644 --- a/sys/geom/geom_gpt.c +++ b/sys/geom/geom_gpt.c @@ -111,11 +111,10 @@ g_gpt_taste(struct g_class *mp, struct g_provider *pp, int insist) struct g_consumer *cp; struct g_geom *gp; struct g_gpt_softc *gs; - struct g_slicer *gsp; u_char *buf, *mbr; struct gpt_ent *ent; struct gpt_hdr *hdr; - u_int i, npart, secsz, tblsz; + u_int i, secsz, tblsz; int error, ps; g_trace(G_T_TOPOLOGY, "g_gpt_taste(%s,%s)", mp->name, pp->name); @@ -131,13 +130,11 @@ g_gpt_taste(struct g_class *mp, struct g_provider *pp, int insist) if (gp == NULL) return (NULL); - gsp = gp->softc; g_topology_unlock(); gp->dumpconf = g_gpt_dumpconf; do { - npart = 0; mbr = NULL; if (gp->rank != 2 && insist == 0) @@ -204,13 +201,11 @@ g_gpt_taste(struct g_class *mp, struct g_provider *pp, int insist) secsz, "%s%c%d", gp->name, ps, i + 1); g_topology_unlock(); - npart++; } g_free(buf); } while (0); - if (mbr != NULL) g_free(mbr); |