Home
last modified time | relevance | path

Searched refs:lfs (Results 1 – 25 of 26) sorted by relevance

12

/littlefs-3.7.0-3.6.0/tests/
Dtest_move.toml3 lfs_t lfs;
4 lfs_format(&lfs, cfg) => 0;
5 lfs_mount(&lfs, cfg) => 0;
6 lfs_mkdir(&lfs, "a") => 0;
7 lfs_mkdir(&lfs, "b") => 0;
8 lfs_mkdir(&lfs, "c") => 0;
9 lfs_mkdir(&lfs, "d") => 0;
11 lfs_file_open(&lfs, &file, "a/hello", LFS_O_CREAT | LFS_O_WRONLY) => 0;
12 lfs_file_write(&lfs, &file, "hola\n", 5) => 5;
13 lfs_file_write(&lfs, &file, "bonjour\n", 8) => 8;
[all …]
Dtest_entries.toml13 lfs_t lfs;
14 lfs_format(&lfs, cfg) => 0;
15 lfs_mount(&lfs, cfg) => 0;
22 lfs_file_open(&lfs, &file, path,
25 lfs_file_write(&lfs, &file, wbuffer, size) => size;
26 lfs_file_size(&lfs, &file) => size;
27 lfs_file_close(&lfs, &file) => 0;
30 lfs_file_open(&lfs, &file, path,
33 lfs_file_write(&lfs, &file, wbuffer, size) => size;
34 lfs_file_size(&lfs, &file) => size;
[all …]
Dtest_dirs.toml3 lfs_t lfs;
4 lfs_format(&lfs, cfg) => 0;
5 lfs_mount(&lfs, cfg) => 0;
7 lfs_dir_open(&lfs, &dir, "/") => 0;
9 lfs_dir_read(&lfs, &dir, &info) => 1;
12 lfs_dir_read(&lfs, &dir, &info) => 1;
15 lfs_dir_read(&lfs, &dir, &info) => 0;
16 lfs_dir_close(&lfs, &dir) => 0;
17 lfs_unmount(&lfs) => 0;
24 lfs_t lfs;
[all …]
Dtest_paths.toml5 lfs_t lfs;
6 lfs_format(&lfs, cfg) => 0;
7 lfs_mount(&lfs, cfg) => 0;
8 lfs_mkdir(&lfs, "tea") => 0;
9 lfs_mkdir(&lfs, "tea/hottea") => 0;
10 lfs_mkdir(&lfs, "tea/warmtea") => 0;
11 lfs_mkdir(&lfs, "tea/coldtea") => 0;
14 lfs_stat(&lfs, "tea/hottea", &info) => 0;
16 lfs_stat(&lfs, "/tea/hottea", &info) => 0;
19 lfs_mkdir(&lfs, "/milk") => 0;
[all …]
Dtest_seek.toml13 lfs_t lfs;
14 lfs_format(&lfs, cfg) => 0;
15 lfs_mount(&lfs, cfg) => 0;
17 lfs_file_open(&lfs, &file, "kitty",
23 lfs_file_write(&lfs, &file, buffer, size);
25 lfs_file_close(&lfs, &file) => 0;
26 lfs_unmount(&lfs) => 0;
28 lfs_mount(&lfs, cfg) => 0;
29 lfs_file_open(&lfs, &file, "kitty", LFS_O_RDONLY) => 0;
34 lfs_file_read(&lfs, &file, buffer, size) => size;
[all …]
Dtest_attrs.toml3 lfs_t lfs;
4 lfs_format(&lfs, cfg) => 0;
5 lfs_mount(&lfs, cfg) => 0;
6 lfs_mkdir(&lfs, "hello") => 0;
8 lfs_file_open(&lfs, &file, "hello/hello", LFS_O_WRONLY | LFS_O_CREAT) => 0;
9 lfs_file_write(&lfs, &file, "hello", strlen("hello")) => strlen("hello");
10 lfs_file_close(&lfs, &file);
11 lfs_unmount(&lfs) => 0;
13 lfs_mount(&lfs, cfg) => 0;
16 lfs_setattr(&lfs, "hello", 'A', "aaaa", 4) => 0;
[all …]
Dtest_superblocks.toml4 lfs_t lfs;
5 lfs_format(&lfs, cfg) => 0;
11 lfs_t lfs;
12 lfs_format(&lfs, cfg) => 0;
13 lfs_mount(&lfs, cfg) => 0;
14 lfs_unmount(&lfs) => 0;
20 lfs_t lfs;
21 lfs_format(&lfs, cfg) => 0;
23 memset(&lfs, 0, sizeof(lfs));
26 lfs_mount(&lfs, &tweaked_cfg) => 0;
[all …]
Dtest_alloc.toml14 lfs_t lfs;
15 lfs_format(&lfs, cfg) => 0;
16 lfs_mount(&lfs, cfg) => 0;
17 lfs_mkdir(&lfs, "breakfast") => 0;
18 lfs_unmount(&lfs) => 0;
20 lfs_mount(&lfs, cfg) => 0;
24 lfs_file_open(&lfs, &files[n], path,
29 lfs_fs_gc(&lfs) => 0;
33 lfs_file_write(&lfs, &files[n], names[n], size) => size;
37 lfs_file_close(&lfs, &files[n]) => 0;
[all …]
Dtest_truncate.toml7 lfs_t lfs;
8 lfs_format(&lfs, cfg) => 0;
9 lfs_mount(&lfs, cfg) => 0;
11 lfs_file_open(&lfs, &file, "baldynoop",
18 lfs_file_write(&lfs, &file, buffer, lfs_min(size, LARGESIZE-j))
21 lfs_file_size(&lfs, &file) => LARGESIZE;
23 lfs_file_close(&lfs, &file) => 0;
24 lfs_unmount(&lfs) => 0;
26 lfs_mount(&lfs, cfg) => 0;
27 lfs_file_open(&lfs, &file, "baldynoop", LFS_O_RDWR) => 0;
[all …]
Dtest_orphans.toml2 in = "lfs.c"
5 lfs_t lfs;
6 lfs_format(&lfs, cfg) => 0;
7 lfs_mount(&lfs, cfg) => 0;
8 lfs_mkdir(&lfs, "parent") => 0;
9 lfs_mkdir(&lfs, "parent/orphan") => 0;
10 lfs_mkdir(&lfs, "parent/child") => 0;
11 lfs_remove(&lfs, "parent/orphan") => 0;
12 lfs_unmount(&lfs) => 0;
17 lfs_mount(&lfs, cfg) => 0;
[all …]
Dtest_files.toml4 lfs_t lfs;
5 lfs_format(&lfs, cfg) => 0;
6 lfs_mount(&lfs, cfg) => 0;
8 lfs_file_open(&lfs, &file, "hello",
13 lfs_file_write(&lfs, &file, buffer, size) => size;
14 lfs_file_close(&lfs, &file) => 0;
15 lfs_unmount(&lfs) => 0;
17 lfs_mount(&lfs, cfg) => 0;
18 lfs_file_open(&lfs, &file, "hello", LFS_O_RDONLY) => 0;
19 lfs_file_read(&lfs, &file, buffer, size) => size;
[all …]
Dtest_evil.toml9 in = "lfs.c"
12 lfs_t lfs;
13 lfs_format(&lfs, cfg) => 0;
16 lfs_init(&lfs, cfg) => 0;
18 lfs_dir_fetch(&lfs, &mdir, (lfs_block_t[2]){0, 1}) => 0;
19 lfs_dir_commit(&lfs, &mdir, LFS_MKATTRS(
24 lfs_deinit(&lfs) => 0;
27 lfs_mount(&lfs, cfg) => LFS_ERR_CORRUPT;
32 in = "lfs.c"
35 lfs_t lfs;
[all …]
Dtest_interspersed.toml6 lfs_t lfs;
9 lfs_format(&lfs, cfg) => 0;
10 lfs_mount(&lfs, cfg) => 0;
14 lfs_file_open(&lfs, &files[j], path,
20 lfs_file_write(&lfs, &files[j], &alphas[j], 1) => 1;
25 lfs_file_close(&lfs, &files[j]);
29 lfs_dir_open(&lfs, &dir, "/") => 0;
31 lfs_dir_read(&lfs, &dir, &info) => 1;
34 lfs_dir_read(&lfs, &dir, &info) => 1;
40 lfs_dir_read(&lfs, &dir, &info) => 1;
[all …]
Dtest_relocations.toml7 lfs_t lfs;
8 lfs_format(&lfs, cfg) => 0;
10 lfs_mount(&lfs, cfg) => 0;
12 lfs_file_open(&lfs, &file, "padding", LFS_O_CREAT | LFS_O_WRONLY) => 0;
15 while (BLOCK_COUNT - lfs_fs_size(&lfs) > 16) {
16 lfs_file_write(&lfs, &file, buffer, 512) => 512;
18 lfs_file_close(&lfs, &file) => 0;
20 lfs_mkdir(&lfs, "child") => 0;
21 lfs_unmount(&lfs) => 0;
23 lfs_mount(&lfs, cfg) => 0;
[all …]
Dtest_powerloss.toml8 lfs_t lfs;
9 lfs_format(&lfs, cfg) => 0;
11 lfs_mount(&lfs, cfg) => 0;
12 lfs_mkdir(&lfs, "notebook") => 0;
14 lfs_file_open(&lfs, &file, "notebook/paper",
20 lfs_file_write(&lfs, &file, buffer, size) => size;
21 lfs_file_sync(&lfs, &file) => 0;
23 lfs_file_close(&lfs, &file) => 0;
26 lfs_file_open(&lfs, &file, "notebook/paper", LFS_O_RDONLY) => 0;
28 lfs_file_read(&lfs, &file, rbuffer, size) => size;
[all …]
Dtest_exhaustion.toml15 lfs_t lfs;
16 lfs_format(&lfs, cfg) => 0;
17 lfs_mount(&lfs, cfg) => 0;
18 lfs_mkdir(&lfs, "roadrunner") => 0;
19 lfs_unmount(&lfs) => 0;
23 lfs_mount(&lfs, cfg) => 0;
32 lfs_file_open(&lfs, &file, path,
37 lfs_ssize_t res = lfs_file_write(&lfs, &file, &c, 1);
40 int err = lfs_file_close(&lfs, &file);
42 lfs_unmount(&lfs) => 0;
[all …]
Dtest_compat.toml5 # - lfs => the new/current version of littlefs
9 # the relevant lfs types/functions as necessary so at least the tests can
80 lfs_t lfs;
81 lfs_mount(&lfs, cfg) => 0;
85 lfs_fs_stat(&lfs, &fsinfo) => 0;
88 lfs_unmount(&lfs) => 0;
116 lfs_t lfs;
117 lfs_mount(&lfs, cfg) => 0;
121 lfs_fs_stat(&lfs, &fsinfo) => 0;
126 lfs_dir_open(&lfs, &dir, "/") => 0;
[all …]
Dtest_badblocks.toml22 lfs_t lfs;
23 lfs_format(&lfs, cfg) => 0;
25 lfs_mount(&lfs, cfg) => 0;
32 lfs_mkdir(&lfs, (char*)buffer) => 0;
40 lfs_file_open(&lfs, &file, (char*)buffer,
45 lfs_file_write(&lfs, &file, buffer, size) => size;
48 lfs_file_close(&lfs, &file) => 0;
50 lfs_unmount(&lfs) => 0;
52 lfs_mount(&lfs, cfg) => 0;
60 lfs_stat(&lfs, (char*)buffer, &info) => 0;
[all …]
/littlefs-3.7.0-3.6.0/
Dlfs.c34 static inline void lfs_cache_drop(lfs_t *lfs, lfs_cache_t *rcache) { in lfs_cache_drop() argument
37 (void)lfs; in lfs_cache_drop()
41 static inline void lfs_cache_zero(lfs_t *lfs, lfs_cache_t *pcache) { in lfs_cache_zero() argument
43 memset(pcache->buffer, 0xff, lfs->cfg->cache_size); in lfs_cache_zero()
47 static int lfs_bd_read(lfs_t *lfs, in lfs_bd_read() argument
52 if (off+size > lfs->cfg->block_size in lfs_bd_read()
53 || (lfs->block_count && block >= lfs->block_count)) { in lfs_bd_read()
94 if (size >= hint && off % lfs->cfg->read_size == 0 && in lfs_bd_read()
95 size >= lfs->cfg->read_size) { in lfs_bd_read()
97 diff = lfs_aligndown(diff, lfs->cfg->read_size); in lfs_bd_read()
[all …]
Dlfs.h416 typedef struct lfs { struct
463 int lfs_format(lfs_t *lfs, const struct lfs_config *config);
474 int lfs_mount(lfs_t *lfs, const struct lfs_config *config);
480 int lfs_unmount(lfs_t *lfs);
489 int lfs_remove(lfs_t *lfs, const char *path);
499 int lfs_rename(lfs_t *lfs, const char *oldpath, const char *newpath);
506 int lfs_stat(lfs_t *lfs, const char *path, struct lfs_info *info);
520 lfs_ssize_t lfs_getattr(lfs_t *lfs, const char *path,
531 int lfs_setattr(lfs_t *lfs, const char *path,
541 int lfs_removeattr(lfs_t *lfs, const char *path, uint8_t type);
[all …]
DMakefile5 TARGET ?= $(BUILDDIR)/lfs
204 code: $(OBJ) $(BUILDDIR)/lfs.code.csv
210 ./scripts/code.py $^ $(CODEFLAGS) -d $(BUILDDIR)/lfs.code.csv
215 data: $(OBJ) $(BUILDDIR)/lfs.data.csv
221 ./scripts/data.py $^ $(DATAFLAGS) -d $(BUILDDIR)/lfs.data.csv
226 stack: $(CI) $(BUILDDIR)/lfs.stack.csv
232 ./scripts/stack.py $^ $(STACKFLAGS) -d $(BUILDDIR)/lfs.stack.csv
238 $(BUILDDIR)/lfs.code.csv \
239 $(BUILDDIR)/lfs.data.csv \
240 $(BUILDDIR)/lfs.stack.csv
[all …]
D.gitignore12 lfs
18 lfs.code.csv
19 lfs.data.csv
20 lfs.stack.csv
21 lfs.structs.csv
22 lfs.cov.csv
23 lfs.perf.csv
24 lfs.perfbd.csv
25 lfs.test.csv
26 lfs.bench.csv
/littlefs-3.7.0-3.6.0/benches/
Dbench_dir.toml10 lfs_t lfs;
11 lfs_format(&lfs, cfg) => 0;
12 lfs_mount(&lfs, cfg) => 0;
20 lfs_file_open(&lfs, &file, name,
28 lfs_file_write(&lfs, &file, buffer, CHUNK_SIZE) => CHUNK_SIZE;
31 lfs_file_close(&lfs, &file) => 0;
44 lfs_file_open(&lfs, &file, name, LFS_O_RDONLY) => 0;
48 lfs_file_read(&lfs, &file, buffer, CHUNK_SIZE) => CHUNK_SIZE;
54 lfs_file_close(&lfs, &file) => 0;
58 lfs_unmount(&lfs) => 0;
[all …]
Dbench_file.toml9 lfs_t lfs;
10 lfs_format(&lfs, cfg) => 0;
11 lfs_mount(&lfs, cfg) => 0;
17 lfs_file_open(&lfs, &file, "file",
25 lfs_file_write(&lfs, &file, buffer, CHUNK_SIZE) => CHUNK_SIZE;
27 lfs_file_write(&lfs, &file, buffer, CHUNK_SIZE) => CHUNK_SIZE;
28 lfs_file_close(&lfs, &file) => 0;
32 lfs_file_open(&lfs, &file, "file", LFS_O_RDONLY) => 0;
40 lfs_file_seek(&lfs, &file, i_*CHUNK_SIZE, LFS_SEEK_SET)
42 lfs_file_read(&lfs, &file, buffer, CHUNK_SIZE) => CHUNK_SIZE;
[all …]
Dbench_superblock.toml7 lfs_t lfs;
8 lfs_format(&lfs, cfg) => 0;
11 lfs_mount(&lfs, cfg) => 0;
17 lfs_file_open(&lfs, &file, name,
24 lfs_file_write(&lfs, &file, buffer, CHUNK_SIZE) => CHUNK_SIZE;
27 lfs_file_close(&lfs, &file) => 0;
29 lfs_unmount(&lfs) => 0;
32 lfs_mount(&lfs, cfg) => 0;
35 lfs_unmount(&lfs) => 0;
40 lfs_t lfs;
[all …]

12