mirror of
https://github.com/littlefs-project/littlefs.git
synced 2025-10-29 11:38:32 +00:00
Compare commits
12 Commits
4241f3bdc5
...
445381645f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
445381645f | ||
|
|
adad0fbbcf | ||
|
|
ed127050bb | ||
|
|
ec26996631 | ||
|
|
17ab6e92f7 | ||
|
|
4cd2bfc2c1 | ||
|
|
f24ff9fb25 | ||
|
|
f5b2226a80 | ||
|
|
172a186fa9 | ||
|
|
8b75de74c9 | ||
|
|
11cecd079c | ||
|
|
8c7b6b26e6 |
@ -267,7 +267,11 @@ License Identifiers that are here available: http://spdx.org/licenses/
|
||||
to create images of the filesystem on your PC. Check if littlefs will fit
|
||||
your needs, create images for a later download to the target memory or
|
||||
inspect the content of a binary image of the target memory.
|
||||
|
||||
|
||||
- [littlefs-toy] - A command-line tool for creating and working with littlefs
|
||||
images. Uses syntax similar to tar command for ease of use. Supports working
|
||||
on littlefs images embedded inside another file (firmware image, etc).
|
||||
|
||||
- [littlefs2-rust] - A Rust wrapper for littlefs. This project allows you
|
||||
to use littlefs in a Rust-friendly API, reaping the benefits of Rust's memory
|
||||
safety and other guarantees.
|
||||
@ -321,6 +325,7 @@ License Identifiers that are here available: http://spdx.org/licenses/
|
||||
[littlefs-js]: https://github.com/geky/littlefs-js
|
||||
[littlefs-js-demo]:http://littlefs.geky.net/demo.html
|
||||
[littlefs-python]: https://pypi.org/project/littlefs-python/
|
||||
[littlefs-toy]: https://github.com/tjko/littlefs-toy
|
||||
[littlefs2-rust]: https://crates.io/crates/littlefs2
|
||||
[nim-littlefs]: https://github.com/Graveflo/nim-littlefs
|
||||
[chamelon]: https://github.com/yomimono/chamelon
|
||||
|
||||
6
lfs2.c
6
lfs2.c
@ -93,6 +93,7 @@ static int lfs2_bd_read(lfs2_t *lfs2,
|
||||
// bypass cache?
|
||||
diff = lfs2_aligndown(diff, lfs2->cfg->read_size);
|
||||
int err = lfs2->cfg->read(lfs2->cfg, block, off, data, diff);
|
||||
LFS2_ASSERT(err <= 0);
|
||||
if (err) {
|
||||
return err;
|
||||
}
|
||||
@ -739,6 +740,7 @@ static lfs2_stag_t lfs2_dir_getslice(lfs2_t *lfs2, const lfs2_mdir_t *dir,
|
||||
int err = lfs2_bd_read(lfs2,
|
||||
NULL, &lfs2->rcache, sizeof(ntag),
|
||||
dir->pair[0], off, &ntag, sizeof(ntag));
|
||||
LFS2_ASSERT(err <= 0);
|
||||
if (err) {
|
||||
return err;
|
||||
}
|
||||
@ -767,6 +769,7 @@ static lfs2_stag_t lfs2_dir_getslice(lfs2_t *lfs2, const lfs2_mdir_t *dir,
|
||||
err = lfs2_bd_read(lfs2,
|
||||
NULL, &lfs2->rcache, diff,
|
||||
dir->pair[0], off+sizeof(tag)+goff, gbuffer, diff);
|
||||
LFS2_ASSERT(err <= 0);
|
||||
if (err) {
|
||||
return err;
|
||||
}
|
||||
@ -1279,6 +1282,7 @@ static lfs2_stag_t lfs2_dir_fetchmatch(lfs2_t *lfs2,
|
||||
if (err == LFS2_ERR_CORRUPT) {
|
||||
break;
|
||||
}
|
||||
return err;
|
||||
}
|
||||
|
||||
lfs2_fcrc_fromle32(&fcrc);
|
||||
@ -2264,7 +2268,7 @@ static int lfs2_dir_relocatingcommit(lfs2_t *lfs2, lfs2_mdir_t *dir,
|
||||
}
|
||||
}
|
||||
|
||||
if (dir->erased) {
|
||||
if (dir->erased && dir->count < 0xff) {
|
||||
// try to commit
|
||||
struct lfs2_commit commit = {
|
||||
.block = dir->pair[0],
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user