Skip to content

Commit

Permalink
storage/stream_flash: Deprecate stream_flash_erase_page
Browse files Browse the repository at this point in the history
The commit marks stream_flash_erase_page as deprecated.
After the function is removed users will have to rely on stream
flash to erase space it needs prior to write.

The stream_flash_erase_page has several issues like using non-relative
offset for erases, allowing to destroy data already written or even
erase out of area available for stream flash.

This fixes #67407

Signed-off-by: Dominik Ermel <[email protected]>
  • Loading branch information
de-nordic committed Nov 29, 2024
1 parent 64f71f7 commit 0e91e12
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/zephyr/storage/stream_flash.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ int stream_flash_buffered_write(struct stream_flash_ctx *ctx, const uint8_t *dat
*
* @return non-negative on success, negative errno code on fail
*/
int stream_flash_erase_page(struct stream_flash_ctx *ctx, off_t off);
__deprecated int stream_flash_erase_page(struct stream_flash_ctx *ctx, off_t off);

/**
* @brief Load persistent stream write progress stored with key
Expand Down

0 comments on commit 0e91e12

Please sign in to comment.