HomeFreeBSD

MFC r356629, r356636

Description

MFC r356629, r356636

r356629:
Apply typo fix from NetBSD, we have already applied all NetBSD changes so
update the NetBSD tag while I'm there.

r356636:
Correct off-by-two issue when determining FAT type.

In the code we used NumClusters as the upper (non-inclusive) boundary
of valid cluster number, so the actual value was 2 (CLUST_FIRST) more
than the real number of clusters. This causes a FAT16 media with
65524 clusters be treated as FAT32 and might affect FAT12 media with
4084 clusters as well.

To fix this, we increment NumClusters by CLUST_FIRST after the type
determination.

PR: 243179

Details

Provenance
delphijAuthored on
Parents
rS357195: netbsd-tests: libc: use correct modes in O_SEARCH tests
Branches
Unknown
Tags
Unknown