-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SYS: FAT32 detection should depend on word FAT sector size == zero, only #93
Comments
I discussed this in dosemu2/fdpp#202 (comment) too. |
Quoting me from that thread:
|
While creating the PR #92 I noticed that SYS determines the FAT type by calculating the number of data clusters then dispatching on that. This is in
kernel/sys/sys.c
Line 1515 in bb1bbbb
However, the kernel itself correctly uses just the zero/nonzero status of the BPB word giving the amount of sectors in a FAT:
kernel/hdr/fat.h
Lines 90 to 93 in bb1bbbb
The kernel is correct: FAT32 is determined solely by whether the BPB word is zero. This also means when calculating the cluster amount (only for dispatching FAT12 vs FAT16) it is correct to use the BPB word, not the EBPB dword, to calculate the space occupied by the FATs. SYS already does that correctly by chance, though it could be clearer about it. In
kernel/sys/sys.c
Line 1507 in bb1bbbb
The text was updated successfully, but these errors were encountered: