]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r305074-r305075, r327275, r327570: newfs_msdos updates
authorkevans <kevans@FreeBSD.org>
Tue, 15 Jan 2019 15:47:01 +0000 (15:47 +0000)
committerkevans <kevans@FreeBSD.org>
Tue, 15 Jan 2019 15:47:01 +0000 (15:47 +0000)
commit5c2dc4965571d306fec98cc07f59e3d9b0770f35
tree9b995795ab2cc54579b25c2461d6de7d1b8ac020
parenta5529f8274c6e262a96221ef07ceb11e0e0639bc
MFC r305074-r305075, r327275, r327570: newfs_msdos updates

r305074:
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.

r305075:
The code only converts from bpbHugeSectors to bpbSectors if the sum of
the hidden and huge sectors is less than or equal MAXU16. When
formatting in Windows bpbSectors is still used for 63488 sectors and
2048 hidden (sum > MAXU16). The hidden sectors count is the number of
sectors before the FAT16 Boot Record so it shouldn't affect the sector
count. Attached patch (huge_sec_conversion.patch) to only check for
bpb.bpbHugeSectors <= MAXU16 when converting to bpbSectors.

r327275:
Close fd and fd1 before returning now that we're done with them.

r327570:
Only call close if fd and fd1 are not -1.

PR: 183234
sbin/newfs_msdos/mkfs_msdos.c