oyama / pico-vfs

Thin virtual file system for Raspberry Pi Pico
Other
5 stars 0 forks source link

FatFs f_lseek() behaviour different from POSIX #20

Closed oyama closed 4 weeks ago

oyama commented 4 weeks ago

As specified in the FatFs documentation, FatFs f_lseek() has a different policy for reporting the file size when moving to an offset above SEEK_END. POSIX reports the actual file size of the write, whereas FatFs reports the size at the seeked position.

As a specific impact, when SQLite is used with FatFs, it reports error code 26 SQLITE_NOTADB when the database is opened.

Reference URL

oyama commented 4 weeks ago

Changed to f_sync to match FatFs f_write. 4e4ae15