Week twelve: Summer of coding report

Fix stuff to wrap up

squimrel
squimrel
Aug 23, 2017 · 2 min read

This is the final evaluation week of summer of code. It turns out when booting with the fat partition that was created by the code I wrote there were a lot of errors. It seemed funny to me because mounting on Linux worked fine.

FAT Specification

Since I didn’t bother to read most of the specification and learned how fat works mainly from dosfstools I forgot to maintain the cluster chain.

A fat file-system is divided into clusters which vary in size based on the fat file-system size. There’s a fat allocation table which marks which clusters have been used by files. If you store a file that uses cluster number 4 to 100 you have to mark all those clusters as used otherwise fat could be unhappy.
It felt a bit ironic to do that because there’s already a marker that “hints” where the next free cluster is and the file size and cluster location is provided by every extent. I guess it could help a bit when a lot of i/o was done on the file-system and it’s messed up and fragmented.

Also I forgot to specify how many free clusters the file-system has.
Feel free to look at the fix.

Boot with persistent storage on Mac (Flags in HFS+)

Support for that was added but it’s very ugly code. Maybe the ugliest I’ve ever written and it doesn’t work on Windows yet because it uses memmem and that’s not available on Windows even though we’re compiling with MinGW.

I broke isomd5sum for Windows

At least it seems to calculate the incorrect checksum even though I fixed some bugs I introduced. Not sure what exactly is the issue. Debugging this is hard even though I got proper debugging tools on Windows. I’ll hope I’ll find the issue in the next couple days before I submit the evaluation.

)
    Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
    Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
    Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade