Changeset View
Changeset View
Standalone View
Standalone View
head/sys/geom/uzip/g_uzip.c
Show First 20 Lines • Show All 843 Lines • ▼ Show 20 Lines | g_uzip_taste(struct g_class *mp, struct g_provider *pp, int flags) | ||||
pp2 = g_new_providerf(gp, "%s", gp->name); | pp2 = g_new_providerf(gp, "%s", gp->name); | ||||
pp2->sectorsize = 512; | pp2->sectorsize = 512; | ||||
pp2->mediasize = (off_t)sc->nblocks * sc->blksz; | pp2->mediasize = (off_t)sc->nblocks * sc->blksz; | ||||
pp2->stripesize = pp->stripesize; | pp2->stripesize = pp->stripesize; | ||||
pp2->stripeoffset = pp->stripeoffset; | pp2->stripeoffset = pp->stripeoffset; | ||||
g_error_provider(pp2, 0); | g_error_provider(pp2, 0); | ||||
g_access(cp, -1, 0, 0); | g_access(cp, -1, 0, 0); | ||||
DPRINTF(GUZ_DBG_INFO, ("%s: taste ok (%d, %jd), (%d, %d), %x\n", | DPRINTF(GUZ_DBG_INFO, ("%s: taste ok (%d, %ju), (%ju, %ju), %x\n", | ||||
gp->name, pp2->sectorsize, (intmax_t)pp2->mediasize, | gp->name, pp2->sectorsize, (uintmax_t)pp2->mediasize, | ||||
pp2->stripeoffset, pp2->stripesize, pp2->flags)); | (uintmax_t)pp2->stripeoffset, (uintmax_t)pp2->stripesize, pp2->flags)); | ||||
DPRINTF(GUZ_DBG_INFO, ("%s: %u x %u blocks\n", gp->name, sc->nblocks, | DPRINTF(GUZ_DBG_INFO, ("%s: %u x %u blocks\n", gp->name, sc->nblocks, | ||||
sc->blksz)); | sc->blksz)); | ||||
return (gp); | return (gp); | ||||
e7: | e7: | ||||
free(sc->last_buf, M_GEOM); | free(sc->last_buf, M_GEOM); | ||||
mtx_destroy(&sc->queue_mtx); | mtx_destroy(&sc->queue_mtx); | ||||
mtx_destroy(&sc->last_mtx); | mtx_destroy(&sc->last_mtx); | ||||
▲ Show 20 Lines • Show All 63 Lines • Show Last 20 Lines |