Skip to content

Commit 6e5f243

Browse files
committed
littlefs: Adopted the block device sync function
Required to garuntee that data is flushed all the way down to the disk level when a file is synced or closed.
1 parent a4f8af9 commit 6e5f243

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

features/filesystem/littlefs/LittleFileSystem.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,8 @@ static int lfs_bd_erase(const struct lfs_config *c, lfs_block_t block)
102102

103103
static int lfs_bd_sync(const struct lfs_config *c)
104104
{
105-
return 0;
105+
BlockDevice *bd = (BlockDevice *)c->context;
106+
return bd->sync();
106107
}
107108

108109

0 commit comments

Comments
 (0)