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:
parent
fd4db67b43
commit
c6dd9274e6
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue