Conversation
Temp remove shift count overflow compiler warnings for FAT32
|
So it supports only FAT32 now? |
|
Hi @toncho11 Thank you @ghaerr ! EDIT: |
|
Yes, I see. It is in the name of the PR. |
|
Hello @tyama501,
Yes, but (for now) I am thinking that if you just move the boot block signature check to after where the BPB information is read, then you might be able to check signature only for non-1024-byte sector floppies. (If you want to later add an additional disk read when Then there may not be a need to rewrite much as it appears that the rest of the program uses Thank you! |
|
With more thought, perhaps something like this would work well. This would allow 512-byte and 1024-byte sectors with a (probably) valid BPB, and only check the boot signature on 512-byte sectored floppies. The error message is changed in case a MINIX disk check is attempted: |
Since FAT12 and FAT16 cluster sizes are 16-bits, removing support (at least for now) from
fsck-dosallows for reducing the memory size ofstruct fatEntryby about half. This in turn seems to allowfsck-dosto run on 1440k floppies and repair them without running out of memory.Tested on @tyama501's floppy image posted in #1819 (reply in thread).
Here's a screenshot of @tyama501's vi-damaged floppy image being repaired which matches the screenshot of the repair working succcesfully with the original fsck_msdos on his host PC (except FAT compare is being skipped):

Obviously we need more testing, but things are looking better now. I would be interested in test cases for more badly damaged FAT filesystems in FAT16 or FAT12 format.