Allow 255 sectors/track for the BSD disklabel. The previous limit

of 63 sectors/track is too PC BIOS specific. On pc98, where the
BSD disklabel is used as well, 255 sectors/track is not uncommon.

Submitted by:	nyan@
This commit is contained in:
Marcel Moolenaar 2008-09-27 15:28:15 +00:00
parent b7382e099d
commit 404cfb5e20
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=183410

View File

@ -322,7 +322,7 @@ g_part_bsd_read(struct g_part_table *basetable, struct g_consumer *cp)
if (le32dec(buf + 40) != pp->sectorsize)
goto invalid_label;
sectors = le32dec(buf + 44);
if (sectors < 1 || sectors > 63)
if (sectors < 1 || sectors > 255)
goto invalid_label;
if (sectors != basetable->gpt_sectors && !basetable->gpt_fixgeom) {
g_part_geometry_heads(msize, sectors, &chs, &heads);