From 54eebee9e8b706fe0c685833d1569c5d61af0535 Mon Sep 17 00:00:00 2001 From: liquidraver <504870+liquidraver@users.noreply.github.com> Date: Thu, 16 Apr 2026 11:10:07 +0200 Subject: [PATCH] remove unnecessary writes on nRF --- .../adapters/datastore/ZephyrDataStore.cpp | 20 ++----------------- 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/zephcore/adapters/datastore/ZephyrDataStore.cpp b/zephcore/adapters/datastore/ZephyrDataStore.cpp index 96f9777..6ccb759 100644 --- a/zephcore/adapters/datastore/ZephyrDataStore.cpp +++ b/zephcore/adapters/datastore/ZephyrDataStore.cpp @@ -770,25 +770,9 @@ bool ZephyrDataStore::putBlobByKey(const uint8_t key[], int key_len, const uint8 bool ZephyrDataStore::deleteBlobByKey(const uint8_t key[], int key_len) { + (void)key; (void)key_len; - const char *path = advBlobsFile(); - struct fs_file_t file; - fs_file_t_init(&file); - if (fs_open(&file, path, FS_O_RDWR) < 0) { - return true; /* no blob file = nothing to delete */ - } - BlobRec tmp; - uint32_t pos = 0; - while (fs_read(&file, (uint8_t *)&tmp, sizeof(tmp)) == (ssize_t)sizeof(tmp)) { - if (memcmp(key, tmp.key, 7) == 0) { - memset(&tmp, 0, sizeof(tmp)); - fs_seek(&file, pos, FS_SEEK_SET); - fs_write(&file, (uint8_t *)&tmp, sizeof(tmp)); - break; - } - pos += sizeof(tmp); - } - fs_close(&file); + /* Stub: MeshCore nRF-style — slot reused on next putBlobByKey, no erase. */ return true; }