FAT file system - fclose(), fflush(): how to flush the stream output

Hi -

I am using the EFFS FAT filesystem provided with the 9P 9215 BSP and am trying to figure out the best way to flush the file buffer to the SD card. After an fwrite (or more accurately, a few fwrites), the only way I can get the system to write the output buffer to the file is by calling fclose. fflush doesn’t seem to be implemented??

What this means is that if the application is shut down or restarted in the midst of writing a long-term log file, all the intermediate data is lost. If I periodically close then re-open the file (appending to the end), then I can force it to write out to the card.

Does anyone know if there is a proper method to get the data flushed out to the card periodically?

Thanks!