Home
last modified time | relevance | path

Searched refs:file (Results 1 – 25 of 29) sorted by relevance

12

/littlefs-3.5.0-3.4.0/tests/
Dtest_entries.toml18 lfs_file_open(&lfs, &file, path,
21 lfs_file_write(&lfs, &file, wbuffer, size) => size;
22 lfs_file_size(&lfs, &file) => size;
23 lfs_file_close(&lfs, &file) => 0;
26 lfs_file_open(&lfs, &file, path,
29 lfs_file_write(&lfs, &file, wbuffer, size) => size;
30 lfs_file_size(&lfs, &file) => size;
31 lfs_file_close(&lfs, &file) => 0;
34 lfs_file_open(&lfs, &file, path,
37 lfs_file_write(&lfs, &file, wbuffer, size) => size;
[all …]
Dtest_seek.toml2 [[case]] # simple file seek
14 lfs_file_open(&lfs, &file, "kitty",
19 lfs_file_write(&lfs, &file, buffer, size);
21 lfs_file_close(&lfs, &file) => 0;
25 lfs_file_open(&lfs, &file, "kitty", LFS_O_RDONLY) => 0;
30 lfs_file_read(&lfs, &file, buffer, size) => size;
32 pos = lfs_file_tell(&lfs, &file);
36 lfs_file_seek(&lfs, &file, pos, LFS_SEEK_SET) => pos;
37 lfs_file_read(&lfs, &file, buffer, size) => size;
40 lfs_file_rewind(&lfs, &file) => 0;
[all …]
Dtest_truncate.toml7 lfs_file_open(&lfs, &file, "baldynoop",
13 lfs_file_write(&lfs, &file, buffer, size) => size;
15 lfs_file_size(&lfs, &file) => LARGESIZE;
17 lfs_file_close(&lfs, &file) => 0;
21 lfs_file_open(&lfs, &file, "baldynoop", LFS_O_RDWR) => 0;
22 lfs_file_size(&lfs, &file) => LARGESIZE;
24 lfs_file_truncate(&lfs, &file, MEDIUMSIZE) => 0;
25 lfs_file_size(&lfs, &file) => MEDIUMSIZE;
27 lfs_file_close(&lfs, &file) => 0;
31 lfs_file_open(&lfs, &file, "baldynoop", LFS_O_RDONLY) => 0;
[all …]
Dtest_files.toml2 [[case]] # simple file test
6 lfs_file_open(&lfs, &file, "hello",
10 lfs_file_write(&lfs, &file, buffer, size) => size;
11 lfs_file_close(&lfs, &file) => 0;
15 lfs_file_open(&lfs, &file, "hello", LFS_O_RDONLY) => 0;
16 lfs_file_read(&lfs, &file, buffer, size) => size;
18 lfs_file_close(&lfs, &file) => 0;
30 lfs_file_open(&lfs, &file, "avacado",
38 lfs_file_write(&lfs, &file, buffer, chunk) => chunk;
40 lfs_file_close(&lfs, &file) => 0;
[all …]
Dtest_alloc.toml37 lfs_file_open(&lfs, &file, path, LFS_O_RDONLY) => 0;
40 lfs_file_read(&lfs, &file, buffer, size) => size;
43 lfs_file_close(&lfs, &file) => 0;
62 lfs_file_open(&lfs, &file, path,
67 lfs_file_write(&lfs, &file, buffer, size) => size;
69 lfs_file_close(&lfs, &file) => 0;
76 lfs_file_open(&lfs, &file, path, LFS_O_RDONLY) => 0;
79 lfs_file_read(&lfs, &file, buffer, size) => size;
82 lfs_file_close(&lfs, &file) => 0;
122 lfs_file_open(&lfs, &file, path, LFS_O_RDONLY) => 0;
[all …]
Dtest_move.toml1 [[case]] # move file
9 lfs_file_open(&lfs, &file, "a/hello", LFS_O_CREAT | LFS_O_WRONLY) => 0;
10 lfs_file_write(&lfs, &file, "hola\n", 5) => 5;
11 lfs_file_write(&lfs, &file, "bonjour\n", 8) => 8;
12 lfs_file_write(&lfs, &file, "ohayo\n", 6) => 6;
13 lfs_file_close(&lfs, &file) => 0;
44 lfs_file_open(&lfs, &file, "a/hello", LFS_O_RDONLY) => LFS_ERR_NOENT;
45 lfs_file_open(&lfs, &file, "b/hello", LFS_O_RDONLY) => LFS_ERR_NOENT;
46 lfs_file_open(&lfs, &file, "c/hello", LFS_O_RDONLY) => 0;
47 lfs_file_read(&lfs, &file, buffer, 5) => 5;
[all …]
Dtest_attrs.toml6 lfs_file_open(&lfs, &file, "hello/hello", LFS_O_WRONLY | LFS_O_CREAT) => 0;
7 lfs_file_write(&lfs, &file, "hello", strlen("hello")) => strlen("hello");
8 lfs_file_close(&lfs, &file);
72 lfs_file_open(&lfs, &file, "hello/hello", LFS_O_RDONLY) => 0;
73 lfs_file_read(&lfs, &file, buffer, sizeof(buffer)) => strlen("hello");
75 lfs_file_close(&lfs, &file);
84 lfs_file_open(&lfs, &file, "hello/hello", LFS_O_WRONLY | LFS_O_CREAT) => 0;
85 lfs_file_write(&lfs, &file, "hello", strlen("hello")) => strlen("hello");
86 lfs_file_close(&lfs, &file);
149 lfs_file_open(&lfs, &file, "hello/hello", LFS_O_RDONLY) => 0;
[all …]
Dtest_exhaustion.toml28 lfs_file_open(&lfs, &file, path,
33 lfs_ssize_t res = lfs_file_write(&lfs, &file, &c, 1);
36 err = lfs_file_close(&lfs, &file);
43 err = lfs_file_close(&lfs, &file);
57 lfs_file_open(&lfs, &file, path, LFS_O_RDONLY) => 0;
61 lfs_file_read(&lfs, &file, &r, 1) => 1;
65 lfs_file_close(&lfs, &file) => 0;
110 lfs_file_open(&lfs, &file, path,
115 lfs_ssize_t res = lfs_file_write(&lfs, &file, &c, 1);
118 err = lfs_file_close(&lfs, &file);
[all …]
Dtest_badblocks.toml37 lfs_file_open(&lfs, &file, (char*)buffer,
42 lfs_file_write(&lfs, &file, buffer, size) => size;
45 lfs_file_close(&lfs, &file) => 0;
63 lfs_file_open(&lfs, &file, (char*)buffer, LFS_O_RDONLY) => 0;
68 lfs_file_read(&lfs, &file, rbuffer, size) => size;
72 lfs_file_close(&lfs, &file) => 0;
111 lfs_file_open(&lfs, &file, (char*)buffer,
116 lfs_file_write(&lfs, &file, buffer, size) => size;
119 lfs_file_close(&lfs, &file) => 0;
137 lfs_file_open(&lfs, &file, (char*)buffer, LFS_O_RDONLY) => 0;
[all …]
Dtest_evil.toml68 lfs_file_open(&lfs, &file, "dir_here/file_here",
70 lfs_file_open(&lfs, &file, "dir_here/file_here",
75 [[case]] # invalid file pointer test
77 define.SIZE = [10, 1000, 100000] # faked file size
81 // make a file
83 lfs_file_open(&lfs, &file, "file_here",
85 lfs_file_close(&lfs, &file) => 0;
88 // change the file pointer to be invalid
92 // make sure id 1 == our file
98 // change file pointer
[all …]
Dtest_relocations.toml10 lfs_file_open(&lfs, &file, "padding", LFS_O_CREAT | LFS_O_WRONLY) => 0;
13 lfs_file_write(&lfs, &file, buffer, 512) => 512;
15 lfs_file_close(&lfs, &file) => 0;
24 lfs_file_open(&lfs, &file, path, LFS_O_CREAT | LFS_O_WRONLY) => 0;
25 lfs_file_close(&lfs, &file) => 0;
76 lfs_file_open(&lfs, &file, "padding", LFS_O_CREAT | LFS_O_WRONLY) => 0;
79 lfs_file_write(&lfs, &file, buffer, 512) => 512;
81 lfs_file_close(&lfs, &file) => 0;
90 lfs_file_open(&lfs, &file, path, LFS_O_CREAT | LFS_O_WRONLY) => 0;
91 lfs_file_close(&lfs, &file) => 0;
[all …]
Dtest_interspersed.toml2 [[case]] # interspersed file test
62 [[case]] # interspersed remove file test
71 lfs_file_open(&lfs, &file, path,
74 lfs_file_write(&lfs, &file, &alphas[j], 1) => 1;
76 lfs_file_close(&lfs, &file);
81 lfs_file_open(&lfs, &file, "zzz", LFS_O_WRONLY | LFS_O_CREAT) => 0;
83 lfs_file_write(&lfs, &file, (const void*)"~", 1) => 1;
84 lfs_file_sync(&lfs, &file) => 0;
89 lfs_file_close(&lfs, &file);
105 lfs_file_open(&lfs, &file, "zzz", LFS_O_RDONLY) => 0;
[all …]
Dtest_superblocks.toml36 lfs_file_open(&lfs, &file, "dummy",
38 lfs_file_close(&lfs, &file) => 0;
48 lfs_file_open(&lfs, &file, "dummy",
50 lfs_file_close(&lfs, &file) => 0;
73 lfs_file_open(&lfs, &file, "dummy",
75 lfs_file_close(&lfs, &file) => 0;
111 lfs_file_open(&lfs, &file, "dummy",
113 lfs_file_close(&lfs, &file) => 0;
Dtest_dirs.toml237 [[case]] # file creation
244 sprintf(path, "file%03d", i);
245 lfs_file_open(&lfs, &file, path,
247 lfs_file_close(&lfs, &file) => 0;
260 sprintf(path, "file%03d", i);
270 [[case]] # file removal
278 lfs_file_open(&lfs, &file, path,
280 lfs_file_close(&lfs, &file) => 0;
322 [[case]] # file rename
330 lfs_file_open(&lfs, &file, path,
[all …]
Dtest_paths.toml175 lfs_file_open(&lfs, &file, "dirt/ground", LFS_O_WRONLY | LFS_O_CREAT)
178 lfs_file_open(&lfs, &file, "dirt/ground/earth", LFS_O_WRONLY | LFS_O_CREAT)
192 lfs_file_open(&lfs, &file, "/", LFS_O_WRONLY | LFS_O_CREAT)
252 lfs_file_open(&lfs, &file, path, LFS_O_WRONLY | LFS_O_CREAT)
259 lfs_file_open(&lfs, &file, path, LFS_O_WRONLY | LFS_O_CREAT)
277 lfs_file_open(&lfs, &file, path,
279 lfs_file_close(&lfs, &file) => 0;
287 lfs_file_open(&lfs, &file, path,
289 lfs_file_close(&lfs, &file) => 0;
/littlefs-3.5.0-3.4.0/
Dlfs.c490 static lfs_ssize_t lfs_file_flushedwrite(lfs_t *lfs, lfs_file_t *file,
492 static lfs_ssize_t lfs_file_rawwrite(lfs_t *lfs, lfs_file_t *file,
494 static int lfs_file_rawsync(lfs_t *lfs, lfs_file_t *file);
495 static int lfs_file_outline(lfs_t *lfs, lfs_file_t *file);
496 static int lfs_file_flush(lfs_t *lfs, lfs_file_t *file);
516 static lfs_ssize_t lfs_file_flushedread(lfs_t *lfs, lfs_file_t *file,
518 static lfs_ssize_t lfs_file_rawread(lfs_t *lfs, lfs_file_t *file,
520 static int lfs_file_rawclose(lfs_t *lfs, lfs_file_t *file);
521 static lfs_soff_t lfs_file_rawsize(lfs_t *lfs, lfs_file_t *file);
2841 static int lfs_file_rawopencfg(lfs_t *lfs, lfs_file_t *file, argument
[all …]
DSPEC.md197 _every_ type of metadata, including file entries, directory fields, and
243 3. **Id (10-bits)** - File id associated with the tag. Each file in a metadata
244 block gets a unique id which is used to associate tags with that file. The
246 file, such as directory and global metadata.
258 Creates a new file with this id. Note that files in a metadata block
269 Deletes the file with this id. An inverse to create, this tag moves over
276 Associates the id with a file name and file type.
278 The data contains the file name stored as an ASCII string (may be expanded to
281 The chunk field in this tag indicates an 8-bit file type which can be one of
285 can not be reassigned without deleting the file.
[all …]
Dlfs.h524 int lfs_file_open(lfs_t *lfs, lfs_file_t *file,
541 int lfs_file_opencfg(lfs_t *lfs, lfs_file_t *file,
551 int lfs_file_close(lfs_t *lfs, lfs_file_t *file);
557 int lfs_file_sync(lfs_t *lfs, lfs_file_t *file);
563 lfs_ssize_t lfs_file_read(lfs_t *lfs, lfs_file_t *file,
573 lfs_ssize_t lfs_file_write(lfs_t *lfs, lfs_file_t *file,
581 lfs_soff_t lfs_file_seek(lfs_t *lfs, lfs_file_t *file,
588 int lfs_file_truncate(lfs_t *lfs, lfs_file_t *file, lfs_off_t size);
595 lfs_soff_t lfs_file_tell(lfs_t *lfs, lfs_file_t *file);
601 int lfs_file_rewind(lfs_t *lfs, lfs_file_t *file);
[all …]
DREADME.md15 failures. All file operations have strong copy-on-write guarantees and if
30 Here's a simple example that updates a file named `boot_count` every time
39 lfs_file_t file;
73 lfs_file_open(&lfs, &file, "boot_count", LFS_O_RDWR | LFS_O_CREAT);
74 lfs_file_read(&lfs, &file, &boot_count, sizeof(boot_count));
78 lfs_file_rewind(&lfs, &file);
79 lfs_file_write(&lfs, &file, &boot_count, sizeof(boot_count));
81 // remember the storage is not updated until the file is closed successfully
82 lfs_file_close(&lfs, &file);
108 Once mounted, the littlefs provides a full set of POSIX-like file and
[all …]
/littlefs-3.5.0-3.4.0/scripts/
Dcoverage.py16 file = None
28 file = m.group('file_name')
29 elif m and file and m.group('func'):
30 funcs.append((file, int(m.group('func_lineno')),
32 elif m and file and m.group('line'):
33 lines[(file, int(m.group('line_lineno')))] += (
38 def func_from_lineno(file, lineno): argument
39 i = b.bisect(funcs, (file, lineno))
40 if i and funcs[i-1][0] == file:
47 for (file, line_lineno), line_hits in lines.items():
[all …]
Ddata.py48 for (file, func), size in results.items():
51 file = re.sub('%s/*' % re.escape(args['build_dir']), '', file)
54 file = re.sub('\.o$', '.c', file)
61 flat_results.append((file, func, size))
134 file = result.pop('file', '')
137 merged_results[(file, func)] = result
142 for file, func, size in results:
143 merged_results[(file, func)]['data_size'] = size
148 for (file, func), result in sorted(merged_results.items()):
149 w.writerow({'file': file, 'name': func, **result})
[all …]
Dcode.py48 for (file, func), size in results.items():
51 file = re.sub('%s/*' % re.escape(args['build_dir']), '', file)
54 file = re.sub('\.o$', '.c', file)
62 flat_results.append((file, func, size))
135 file = result.pop('file', '')
138 merged_results[(file, func)] = result
143 for file, func, size in results:
144 merged_results[(file, func)]['code_size'] = size
149 for (file, func), result in sorted(merged_results.items()):
150 w.writerow({'file': file, 'name': func, **result})
[all …]
Dstructs.py98 for (file, struct), size in results.items():
101 file = re.sub('%s/*' % re.escape(args['build_dir']), '', file)
106 if not file.endswith('.h'):
110 file = re.sub('\.o$', '.c', file)
112 flat_results.append((file, struct, size))
186 file = result.pop('file', '')
189 merged_results[(file, struct)] = result
194 for file, struct, size in results:
195 merged_results[(file, struct)]['struct_size'] = size
200 for (file, struct), result in sorted(merged_results.items()):
[all …]
Dstack.py63 function, file, size, type = m.groups()
69 file, function, int(size), targets)
197 file = result.pop('file', '')
201 merged_results[(file, func)] = result
206 for file, func, frame, limit, _ in results:
207 merged_results[(file, func)]['stack_frame'] = frame
208 merged_results[(file, func)]['stack_limit'] = limit
213 for (file, func), result in sorted(merged_results.items()):
214 w.writerow({'file': file, 'name': func, **result})
219 for file, func, frame, limit, deps in results:
[all …]
Dsummary.py77 file = result.pop('file', '')
79 prev = results[(file, name)]
84 results[(file, name)][field.name] = field.acc(
87 results[(file, name)][field.name] = r
122 file = result.pop('file', '')
124 prev = prev_results[(file, name)]
129 prev_results[(file, name)][field.name] = field.acc(
132 prev_results[(file, name)][field.name] = r
150 for (file, func), result in results.items():
151 entry = (file if by == 'file' else func)

12