From 0e91e128a3b0f67e845dc54f3af350a8ef5845e7 Mon Sep 17 00:00:00 2001 From: Dominik Ermel Date: Fri, 29 Nov 2024 13:13:46 +0100 Subject: [PATCH] storage/stream_flash: Deprecate stream_flash_erase_page 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 --- include/zephyr/storage/stream_flash.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/zephyr/storage/stream_flash.h b/include/zephyr/storage/stream_flash.h index b28b204da053bbe..60b216bf44eee28 100644 --- a/include/zephyr/storage/stream_flash.h +++ b/include/zephyr/storage/stream_flash.h @@ -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