We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4dd30c1 commit 749a456Copy full SHA for 749a456
lfs.c
@@ -688,7 +688,7 @@ static int lfs_alloc(lfs_t *lfs, lfs_block_t *block) {
688
if (lfs->lookahead.ckpoint <= 0) {
689
LFS_ERROR("No more free space 0x%"PRIx32,
690
(lfs->lookahead.start + lfs->lookahead.next)
691
- % lfs->cfg->block_count);
+ % lfs->block_count);
692
return LFS_ERR_NOSPC;
693
}
694
lfs.h
@@ -204,6 +204,7 @@ struct lfs_config {
204
lfs_size_t block_size;
205
206
// Number of erasable blocks on the device.
207
+ // If 0, will attempt to infer block_count from existing filesystem.
208
lfs_size_t block_count;
209
210
// Number of erase cycles before littlefs evicts metadata logs and moves
0 commit comments