mirror of
https://github.com/eledio-devices/thirdparty-littlefs.git
synced 2025-11-01 00:38:29 +01:00
Generated v2 prefixes
This commit is contained in:
@@ -136,6 +136,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
- STAGE=test
|
- STAGE=test
|
||||||
- NAME=littlefs-migration
|
- NAME=littlefs-migration
|
||||||
|
if: branch !~ -prefix$
|
||||||
install:
|
install:
|
||||||
- sudo apt-get install libfuse-dev
|
- sudo apt-get install libfuse-dev
|
||||||
- git clone --depth 1 https://github.com/geky/littlefs-fuse -b v2-alpha v2
|
- git clone --depth 1 https://github.com/geky/littlefs-fuse -b v2-alpha v2
|
||||||
|
|||||||
15
lfs2.c
15
lfs2.c
@@ -80,21 +80,6 @@ static int lfs2_bd_read(lfs2_t *lfs2,
|
|||||||
diff = lfs2_min(diff, rcache->off-off);
|
diff = lfs2_min(diff, rcache->off-off);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (size >= hint && off % lfs2->cfg->read_size == 0 &&
|
|
||||||
size >= lfs2->cfg->read_size) {
|
|
||||||
// bypass cache?
|
|
||||||
diff = lfs2_aligndown(diff, lfs2->cfg->read_size);
|
|
||||||
int err = lfs2->cfg->read(lfs2->cfg, block, off, data, diff);
|
|
||||||
if (err) {
|
|
||||||
return err;
|
|
||||||
}
|
|
||||||
|
|
||||||
data += diff;
|
|
||||||
off += diff;
|
|
||||||
size -= diff;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
// load to cache, first condition can no longer fail
|
// load to cache, first condition can no longer fail
|
||||||
LFS2_ASSERT(block < lfs2->cfg->block_count);
|
LFS2_ASSERT(block < lfs2->cfg->block_count);
|
||||||
rcache->block = block;
|
rcache->block = block;
|
||||||
|
|||||||
Reference in New Issue
Block a user