insane-adding-machines / frosted

Frosted: Free POSIX OS for tiny embedded devices
GNU General Public License v2.0
214 stars 39 forks source link

fatfs needs O_APPEND passed to it if a file is created #136

Closed brabo closed 6 years ago

brabo commented 6 years ago

At the moment, if a file is non existing, vfs ends up calling the fs's creat op, but no flags are passed to it. After that, it does not call the fs open op, which might pose issues if there is no creat op to begin with. Scenario 1: we need open to be called in any case, to ensure the fs is made aware that the file is opened, in which case we do have the flags there that way. an fs might not have a creat op, and in that case the way things are atm it has no idea that the newly created file was opened. Scenario 2: we need to pass the flags on to where the creat op is called, and to the creat op itself.

brabo commented 6 years ago

137

brabo commented 6 years ago

Fixed in #137