diff options
author | sos <sos@FreeBSD.org> | 2004-10-07 17:37:09 +0000 |
---|---|---|
committer | sos <sos@FreeBSD.org> | 2004-10-07 17:37:09 +0000 |
commit | 058a8fa0b8d64f4e20b3b2576702171acacabc42 (patch) | |
tree | 17f8420f709854f556957da9885e99ea7cfb91b3 /sys/geom/geom_pc98.c | |
parent | 0d30f6aba945db1c6c52389c46ab66f602652ddd (diff) | |
download | FreeBSD-src-058a8fa0b8d64f4e20b3b2576702171acacabc42.zip FreeBSD-src-058a8fa0b8d64f4e20b3b2576702171acacabc42.tar.gz |
Move the PC98 specific geometry "gunk" to geom_pc98.c where it belongs.
This also adds support for bigger disks on the controller I have access to,
and maybe others if I understood the adhoc methods used on those.
Those with more PC98 bigdrive controllers it is hereby invited to add/fix
support for those in geom_pc98.c and not using #ifdef PC98 all over the place.
Diffstat (limited to 'sys/geom/geom_pc98.c')
-rw-r--r-- | sys/geom/geom_pc98.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/sys/geom/geom_pc98.c b/sys/geom/geom_pc98.c index afbc59f..355e121 100644 --- a/sys/geom/geom_pc98.c +++ b/sys/geom/geom_pc98.c @@ -258,6 +258,25 @@ g_pc98_taste(struct g_class *mp, struct g_provider *pp, int flags) sectorsize = cp->provider->sectorsize; if (sectorsize < 512) break; + if (cp->provider->mediasize/sectorsize < 17*8*65535) { + fwsectors = 17; + fwheads = 8; + } + else if (cp->provider->mediasize/sectorsize < 63*16*65535) { + if (fwsectors > 63) + fwsectors = 63; + if (fwheads > 16) + fwheads = 16; + } + else if (cp->provider->mediasize/sectorsize < 255*16*65535) { + fwsectors = 255; + if (fwheads > 16) + fwheads = 16; + } + else { + fwsectors = 255; + fwheads = 255; + } buf = g_read_data(cp, 0, 8192, &error); if (buf == NULL || error != 0) break; |