mirror of
https://github.com/apache/nuttx.git
synced 2025-12-13 23:17:11 +08:00
fs/littlefs/lfs.c: Fix lfs_format bug. In superblock disk root-block assignment, the second must be root[1].
This commit is contained in:
@@ -3051,7 +3051,7 @@ int lfs_format(FAR lfs_t *lfs, FAR const struct lfs_config_s *cfg)
|
||||
superblock.d.block_size = lfs->cfg->block_size;
|
||||
superblock.d.block_count = lfs->cfg->block_count;
|
||||
superblock.d.root[0] = lfs->root[0];
|
||||
superblock.d.root[0] = lfs->root[1];
|
||||
superblock.d.root[1] = lfs->root[1];
|
||||
|
||||
memcpy(superblock.d.magic, "littlefs", 8);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user