summaryrefslogtreecommitdiffstats
path: root/sys/geom/uzip
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2010-01-06 13:14:37 +0000
committermav <mav@FreeBSD.org>2010-01-06 13:14:37 +0000
commitaa7d598791ab282f0c1fea4c6d4fda1572dc2113 (patch)
treef08ce393d8ead635481260b04f1c59a3baacc9be /sys/geom/uzip
parent9a19597575a3051380fcacaf2bda88192d539b73 (diff)
downloadFreeBSD-src-aa7d598791ab282f0c1fea4c6d4fda1572dc2113.zip
FreeBSD-src-aa7d598791ab282f0c1fea4c6d4fda1572dc2113.tar.gz
Change the way in which zero stripesize is handled. Instead of reporting
zero stripeoffset in such case (as if device has no stripes), report offset from the beginning of the media (as if device has single infinite stripe). This gives partitioning tools information, required to guess better partition alignment, in case if hardware doesn't report it's stripe size. For example, it should give disklabel info about odd offset made by fdisk.
Diffstat (limited to 'sys/geom/uzip')
-rw-r--r--sys/geom/uzip/g_uzip.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/geom/uzip/g_uzip.c b/sys/geom/uzip/g_uzip.c
index 90eee02..2301efb 100644
--- a/sys/geom/uzip/g_uzip.c
+++ b/sys/geom/uzip/g_uzip.c
@@ -467,10 +467,8 @@ g_uzip_taste(struct g_class *mp, struct g_provider *pp, int flags)
pp2->sectorsize = 512;
pp2->mediasize = (off_t)sc->nblocks * sc->blksz;
pp2->flags = pp->flags & G_PF_CANDELETE;
- if (pp->stripesize > 0) {
- pp2->stripesize = pp->stripesize;
- pp2->stripeoffset = pp->stripeoffset;
- }
+ pp2->stripesize = pp->stripesize;
+ pp2->stripeoffset = pp->stripeoffset;
g_error_provider(pp2, 0);
g_access(cp, -1, 0, 0);
OpenPOWER on IntegriCloud