James Walmsley - 2008-11-20

Actually its not supposed to be updated automatically. You have to make a call to the fat_countFreeClusters() function.

I think there is also an environment variable somewhere you can set to have this updated. It's easier to call the aforementioned function once (and only once as its very computationally expensive) at the beggining of your system init (e.g. where you mount the drives).

Knowing the amount of free clusters on a FAT fs is actually always a bit tricky anyway, and updating the FreeClusterCount all the time would be a waste of time. You only need to know this out of interest to the user, if you try to write a file, and there aren't enough clusters available then the fwrite function will fail, and you can deal with the error approriately.