Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/littlefs-project/littlefs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Haster <chaster@utexas.edu>2019-05-23 00:18:41 +0300
committerChristopher Haster <chaster@utexas.edu>2019-05-24 00:43:23 +0300
commitef77195a640db9fa0dda16fc982373b9427fae1a (patch)
tree8679f3c663a12f6b92bc3f90c69f24f96ede7622
parent12e464e9c37dd865e432716856bf2a30fd948297 (diff)
Fixed limit of inline files based on LFS_ATTR_MAXv2.0.4
The maximum limit of inline files and attributes are unrelated, but were not at a point in littlefs v2 development. This should be checking against the bit-field limit in the littlefs tag. Found by lsilvaalmeida
-rw-r--r--lfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lfs.c b/lfs.c
index 71dad3a..a12fdcf 100644
--- a/lfs.c
+++ b/lfs.c
@@ -2737,7 +2737,7 @@ lfs_ssize_t lfs_file_write(lfs_t *lfs, lfs_file_t *file,
if ((file->flags & LFS_F_INLINE) &&
lfs_max(file->pos+nsize, file->ctz.size) >
- lfs_min(LFS_ATTR_MAX, lfs_min(
+ lfs_min(0x3fe, lfs_min(
lfs->cfg->cache_size, lfs->cfg->block_size/8))) {
// inline file doesn't fit anymore
file->off = file->pos;