32451230e2
The stream_flash_buffered_write, when invoked to do flush write, will attempt to write the tail bytes from the buffer, filling the required minimal write block size with erase value bytes; after write it rewinds the buffer offset, bytes_written, by number of the "filler bytes". Doe to lack of return code processing from flash_sync call, two things would happen to context in case of failure: 1) the ctx->bytes_written would be rewind pass the value it had before function call as it gets decremented by "filler bytes" even if write failed; 2) the ctx->buf_bytes offset would be accounting for added "filler bytes" which should not be counted as data in buffer. Proper processing of return code has been added to remove effects described above. Unit tests have been expended to cover the scenarios. Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no> |
||
---|---|---|
.. | ||
flash_map | ||
stream | ||
CMakeLists.txt | ||
Kconfig |