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.
pull/5926/head
Christopher Haster 2018-01-24 18:07:47 -06:00
parent a4f8af9d5b
commit 6e5f2439a3
1 changed files with 2 additions and 1 deletions

View File

@ -102,7 +102,8 @@ static int lfs_bd_erase(const struct lfs_config *c, lfs_block_t block)
static int lfs_bd_sync(const struct lfs_config *c)
{
return 0;
BlockDevice *bd = (BlockDevice *)c->context;
return bd->sync();
}