ARMmbed / mbed-os-example-filesystem

The Mbed OS file system example
https://mbed.com
Apache License 2.0
16 stars 33 forks source link

Fixed issue with read after write #34

Closed geky closed 6 years ago

geky commented 6 years ago

per the open group documentation (here):

When a file is opened with update mode ('+' as the second or third character in the mode argument), both input and output may be performed on the associated stream. However, the application shall ensure that output is not directly followed by input without an intervening call to fflush() or to a file positioning function (fseek(), fsetpos(), or rewind()).

Unfortunately, the example has an ftell between a read and a write, which will cause the data to be flushed on GCG + IAR, but not on ARMCC.

should resolve https://github.com/ARMmbed/mbed-os-example-filesystem/issues/16 cc @kegilbert, @cmonr

adbridge commented 6 years ago

@geky @kegilbert Can we please get this merged today as it will be needed for rc2