Remove CHS alignment. It's not needed and causes problems for the BBB

boot partition. NetBSD removed it in 1.10 in their repo some time ago.

Submitted by: Guy Yur
PR: 183234
This commit is contained in:
Warner Losh 2016-08-30 18:01:19 +00:00
parent 7090a45142
commit 4a9fb9fb80
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=305074

View File

@ -313,15 +313,8 @@ mkfs_msdos(const char *fname, const char *dtype, const struct msdos_options *op)
bpb.bpbHiddenSecs = o.hidden_sectors;
if (!(o.floppy || (o.drive_heads && o.sectors_per_track &&
o.bytes_per_sector && o.size && o.hidden_sectors_set))) {
off_t delta;
getdiskinfo(fd, fname, dtype, o.hidden_sectors_set, &bpb);
bpb.bpbHugeSectors -= (o.offset / bpb.bpbBytesPerSec);
delta = bpb.bpbHugeSectors % bpb.bpbSecPerTrack;
if (delta != 0) {
warnx("trim %d sectors to adjust to a multiple of %d",
(int)delta, bpb.bpbSecPerTrack);
bpb.bpbHugeSectors -= delta;
}
if (bpb.bpbSecPerClust == 0) { /* set defaults */
if (bpb.bpbHugeSectors <= 6000) /* about 3MB -> 512 bytes */
bpb.bpbSecPerClust = 1;