Another bug on FATFileSystem

20 May 2011

Hi,

I found another bug on FATFileSystem. On line 20 of MemFileSystem.h, the code is :

 memset(sectors, 0, 2000);

But sectors[2000] has not a lenght of 2000 bytes, but 2000 * sizeof(char*). I think the good code is :

 memset(sectors, 0, 2000 * sizeof(char*) );

This is very important because in the first version, the last 1000 pointers of sectors was wrong.

Regards, Steph.

23 Dec 2011

Hello Stéphane, I am pulling the FATFileSystem code over into my gcc4mbed project for some of the samples and I have incorporated this fix and the one you mention in http://mbed.org/forum/mbed/topic/2273/?page=1#comment-11521. Thanks so much for debugging these issues and sharing the fixes. Have you found any other fixes that I should incorporate? :)

Thanks again,

Adam

25 Dec 2011

I have published an update FAT File System driver: http://mbed.org/users/AdamGreen/libraries/FatFileSystem/m2qmg3

Features include: