Home
last modified time | relevance | path

Searched full:0 (Results 1 – 25 of 34) sorted by relevance

12

/littlefs-2.7.6/tests/
Dtest_attrs.toml3 lfs_format(&lfs, &cfg) => 0;
4 lfs_mount(&lfs, &cfg) => 0;
5 lfs_mkdir(&lfs, "hello") => 0;
6 lfs_file_open(&lfs, &file, "hello/hello", LFS_O_WRONLY | LFS_O_CREAT) => 0;
9 lfs_unmount(&lfs) => 0;
11 lfs_mount(&lfs, &cfg) => 0;
12 memset(buffer, 0, sizeof(buffer));
13 lfs_setattr(&lfs, "hello", 'A', "aaaa", 4) => 0;
14 lfs_setattr(&lfs, "hello", 'B', "bbbbbb", 6) => 0;
15 lfs_setattr(&lfs, "hello", 'C', "ccccc", 5) => 0;
[all …]
Dtest_move.toml3 lfs_format(&lfs, &cfg) => 0;
4 lfs_mount(&lfs, &cfg) => 0;
5 lfs_mkdir(&lfs, "a") => 0;
6 lfs_mkdir(&lfs, "b") => 0;
7 lfs_mkdir(&lfs, "c") => 0;
8 lfs_mkdir(&lfs, "d") => 0;
9 lfs_file_open(&lfs, &file, "a/hello", LFS_O_CREAT | LFS_O_WRONLY) => 0;
13 lfs_file_close(&lfs, &file) => 0;
14 lfs_unmount(&lfs) => 0;
16 lfs_mount(&lfs, &cfg) => 0;
[all …]
Dtest_paths.toml4 lfs_format(&lfs, &cfg) => 0;
5 lfs_mount(&lfs, &cfg) => 0;
6 lfs_mkdir(&lfs, "tea") => 0;
7 lfs_mkdir(&lfs, "tea/hottea") => 0;
8 lfs_mkdir(&lfs, "tea/warmtea") => 0;
9 lfs_mkdir(&lfs, "tea/coldtea") => 0;
11 lfs_stat(&lfs, "tea/hottea", &info) => 0;
12 assert(strcmp(info.name, "hottea") == 0);
13 lfs_stat(&lfs, "/tea/hottea", &info) => 0;
14 assert(strcmp(info.name, "hottea") == 0);
[all …]
Dtest_files.toml4 lfs_format(&lfs, &cfg) => 0;
5 lfs_mount(&lfs, &cfg) => 0;
7 LFS_O_WRONLY | LFS_O_CREAT | LFS_O_EXCL) => 0;
11 lfs_file_close(&lfs, &file) => 0;
12 lfs_unmount(&lfs) => 0;
14 lfs_mount(&lfs, &cfg) => 0;
15 lfs_file_open(&lfs, &file, "hello", LFS_O_RDONLY) => 0;
17 assert(strcmp((char*)buffer, "Hello World!") == 0);
18 lfs_file_close(&lfs, &file) => 0;
19 lfs_unmount(&lfs) => 0;
[all …]
Dtest_dirs.toml3 lfs_format(&lfs, &cfg) => 0;
4 lfs_mount(&lfs, &cfg) => 0;
5 lfs_dir_open(&lfs, &dir, "/") => 0;
8 assert(strcmp(info.name, ".") == 0);
11 assert(strcmp(info.name, "..") == 0);
12 lfs_dir_read(&lfs, &dir, &info) => 0;
13 lfs_dir_close(&lfs, &dir) => 0;
14 lfs_unmount(&lfs) => 0;
18 define.N = 'range(0, 100, 3)'
20 lfs_format(&lfs, &cfg) => 0;
[all …]
Dtest_evil.toml8 define.INVALSET = [0x3, 0x1, 0x2]
12 lfs_format(&lfs, &cfg) => 0;
15 lfs_init(&lfs, &cfg) => 0;
17 lfs_dir_fetch(&lfs, &mdir, (lfs_block_t[2]){0, 1}) => 0;
19 {LFS_MKTAG(LFS_TYPE_HARDTAIL, 0x3ff, 8),
21 (INVALSET & 0x1) ? 0xcccccccc : 0,
22 (INVALSET & 0x2) ? 0xcccccccc : 0}})) => 0;
23 lfs_deinit(&lfs) => 0;
30 define.INVALSET = [0x3, 0x1, 0x2]
34 lfs_format(&lfs, &cfg) => 0;
[all …]
Dtest_alloc.toml12 lfs_format(&lfs, &cfg) => 0;
13 lfs_mount(&lfs, &cfg) => 0;
14 lfs_mkdir(&lfs, "breakfast") => 0;
15 lfs_unmount(&lfs) => 0;
17 lfs_mount(&lfs, &cfg) => 0;
18 for (int n = 0; n < FILES; n++) {
21 LFS_O_WRONLY | LFS_O_CREAT | LFS_O_APPEND) => 0;
23 for (int n = 0; n < FILES; n++) {
25 for (lfs_size_t i = 0; i < SIZE; i += size) {
29 for (int n = 0; n < FILES; n++) {
[all …]
Dtest_badblocks.toml6 define.LFS_ERASE_CYCLES = 0xffffffff
7 define.LFS_ERASE_VALUE = [0x00, 0xff, -1]
19 lfs_testbd_setwear(&cfg, badblock-1, 0) => 0;
20 lfs_testbd_setwear(&cfg, badblock, 0xffffffff) => 0;
22 lfs_format(&lfs, &cfg) => 0;
24 lfs_mount(&lfs, &cfg) => 0;
26 for (int j = 0; j < NAMEMULT; j++) {
27 buffer[j] = '0'+i;
29 buffer[NAMEMULT] = '\0';
30 lfs_mkdir(&lfs, (char*)buffer) => 0;
[all …]
Dtest_truncate.toml5 lfs_format(&lfs, &cfg) => 0;
6 lfs_mount(&lfs, &cfg) => 0;
8 LFS_O_WRONLY | LFS_O_CREAT) => 0;
12 for (lfs_off_t j = 0; j < LARGESIZE; j += size) {
17 lfs_file_close(&lfs, &file) => 0;
18 lfs_unmount(&lfs) => 0;
20 lfs_mount(&lfs, &cfg) => 0;
21 lfs_file_open(&lfs, &file, "baldynoop", LFS_O_RDWR) => 0;
24 lfs_file_truncate(&lfs, &file, MEDIUMSIZE) => 0;
27 lfs_file_close(&lfs, &file) => 0;
[all …]
Dtest_entries.toml6 if = 'LFS_CACHE_SIZE % LFS_PROG_SIZE == 0 && LFS_CACHE_SIZE == 512'
13 lfs_format(&lfs, &cfg) => 0;
14 lfs_mount(&lfs, &cfg) => 0;
19 LFS_O_WRONLY | LFS_O_CREAT | LFS_O_TRUNC) => 0;
23 lfs_file_close(&lfs, &file) => 0;
27 LFS_O_WRONLY | LFS_O_CREAT | LFS_O_TRUNC) => 0;
31 lfs_file_close(&lfs, &file) => 0;
35 LFS_O_WRONLY | LFS_O_CREAT | LFS_O_TRUNC) => 0;
39 lfs_file_close(&lfs, &file) => 0;
43 LFS_O_WRONLY | LFS_O_CREAT | LFS_O_TRUNC) => 0;
[all …]
Dtest_seek.toml12 lfs_format(&lfs, &cfg) => 0;
13 lfs_mount(&lfs, &cfg) => 0;
15 LFS_O_WRONLY | LFS_O_CREAT | LFS_O_APPEND) => 0;
18 for (int j = 0; j < COUNT; j++) {
21 lfs_file_close(&lfs, &file) => 0;
22 lfs_unmount(&lfs) => 0;
24 lfs_mount(&lfs, &cfg) => 0;
25 lfs_file_open(&lfs, &file, "kitty", LFS_O_RDONLY) => 0;
29 for (int i = 0; i < SKIP; i++) {
31 memcmp(buffer, "kittycatcat", size) => 0;
[all …]
Dtest_exhaustion.toml14 lfs_format(&lfs, &cfg) => 0;
15 lfs_mount(&lfs, &cfg) => 0;
16 lfs_mkdir(&lfs, "roadrunner") => 0;
17 lfs_unmount(&lfs) => 0;
19 uint32_t cycle = 0;
21 lfs_mount(&lfs, &cfg) => 0;
22 for (uint32_t i = 0; i < FILES; i++) {
29 LFS_O_WRONLY | LFS_O_CREAT | LFS_O_TRUNC) => 0;
31 for (lfs_size_t j = 0; j < size; j++) {
37 assert(err == 0 || err == LFS_ERR_NOSPC);
[all …]
Dtest_interspersed.toml8 lfs_format(&lfs, &cfg) => 0;
9 lfs_mount(&lfs, &cfg) => 0;
10 for (int j = 0; j < FILES; j++) {
13 LFS_O_WRONLY | LFS_O_CREAT | LFS_O_EXCL) => 0;
16 for (int i = 0; i < SIZE; i++) {
17 for (int j = 0; j < FILES; j++) {
22 for (int j = 0; j < FILES; j++) {
26 lfs_dir_open(&lfs, &dir, "/") => 0;
28 assert(strcmp(info.name, ".") == 0);
31 assert(strcmp(info.name, "..") == 0);
[all …]
Dtest_relocations.toml7 lfs_format(&lfs, &cfg) => 0;
9 lfs_mount(&lfs, &cfg) => 0;
10 lfs_file_open(&lfs, &file, "padding", LFS_O_CREAT | LFS_O_WRONLY) => 0;
11 memset(buffer, 0, 512);
15 lfs_file_close(&lfs, &file) => 0;
17 lfs_mkdir(&lfs, "child") => 0;
18 lfs_unmount(&lfs) => 0;
20 lfs_mount(&lfs, &cfg) => 0;
21 for (int j = 0; j < ITERATIONS; j++) {
22 for (int i = 0; i < COUNT; i++) {
[all …]
Dtest_superblocks.toml3 lfs_format(&lfs, &cfg) => 0;
8 lfs_format(&lfs, &cfg) => 0;
9 lfs_mount(&lfs, &cfg) => 0;
10 lfs_unmount(&lfs) => 0;
18 lfs_format(&lfs, &cfg) => 0;
19 lfs_mount(&lfs, &cfg) => 0;
21 lfs_unmount(&lfs) => 0;
33 lfs_format(&lfs, &cfg) => 0;
34 lfs_mount(&lfs, &cfg) => 0;
35 for (int i = 0; i < N; i++) {
[all …]
Dtest_orphans.toml3 if = 'LFS_PROG_SIZE <= 0x3fe' # only works with one crc per commit
5 lfs_format(&lfs, &cfg) => 0;
6 lfs_mount(&lfs, &cfg) => 0;
7 lfs_mkdir(&lfs, "parent") => 0;
8 lfs_mkdir(&lfs, "parent/orphan") => 0;
9 lfs_mkdir(&lfs, "parent/child") => 0;
10 lfs_remove(&lfs, "parent/orphan") => 0;
11 lfs_unmount(&lfs) => 0;
16 lfs_mount(&lfs, &cfg) => 0;
17 lfs_dir_open(&lfs, &dir, "parent/child") => 0;
[all …]
/littlefs-2.7.6/scripts/
Dreadmdir.py9 'splice': (0x700, 0x400),
10 'create': (0x7ff, 0x401),
11 'delete': (0x7ff, 0x4ff),
12 'name': (0x700, 0x000),
13 'reg': (0x7ff, 0x001),
14 'dir': (0x7ff, 0x002),
15 'superblock': (0x7ff, 0x0ff),
16 'struct': (0x700, 0x200),
17 'dirstruct': (0x7ff, 0x200),
18 'ctzstruct': (0x7ff, 0x202),
[all …]
Dreadtree.py12 gstate = b'\0\0\0\0\0\0\0\0\0\0\0\0'
42 mdir.tail = mdir[Tag('tail', 0, 0)]
51 Tag(0x7ff, 0x3ff, 0), Tag('superblock', 0, 0)]
52 superblock = nsuperblock, mdir[Tag('inlinestruct', 0, 0)]
58 ngstate = mdir[Tag('movestate', 0, 0)]
59 gstate = bytes((a or 0) ^ (b or 0)
83 dirtable[frozenset(dir[0].blocks)] = dir
85 pending = [("/", dirs[0])]
87 path, dir = pending.pop(0)
93 dirstruct = mdir[Tag('dirstruct', tag.id, 0)]
[all …]
/littlefs-2.7.6/
Dlfs.c23 memset(pcache->buffer, 0xff, lfs->cfg->cache_size); in lfs_cache_zero()
37 while (size > 0) { in lfs_bd_read()
74 if (size >= hint && off % lfs->cfg->read_size == 0 && in lfs_bd_read()
101 LFS_ASSERT(err <= 0); in lfs_bd_read()
107 return 0; in lfs_bd_read()
111 LFS_CMP_EQ = 0,
122 for (lfs_off_t i = 0; i < size; i++) { in lfs_bd_cmp()
146 LFS_ASSERT(err <= 0); in lfs_bd_flush()
157 if (res < 0) { in lfs_bd_flush()
169 return 0; in lfs_bd_flush()
[all …]
Dlfs_util.c16 0x00000000, 0x1db71064, 0x3b6e20c8, 0x26d930ac, in lfs_crc()
17 0x76dc4190, 0x6b6b51f4, 0x4db26158, 0x5005713c, in lfs_crc()
18 0xedb88320, 0xf00f9344, 0xd6d6a3e8, 0xcb61b38c, in lfs_crc()
19 0x9b64c2b0, 0x86d3d2d4, 0xa00ae278, 0xbdbdf21c, in lfs_crc()
24 for (size_t i = 0; i < size; i++) { in lfs_crc()
25 crc = (crc >> 4) ^ rtable[(crc ^ (data[i] >> 0)) & 0xf]; in lfs_crc()
26 crc = (crc >> 4) ^ rtable[(crc ^ (data[i] >> 4)) & 0xf]; in lfs_crc()
Dlfs.h24 #define LFS_VERSION 0x00020002
25 #define LFS_VERSION_MAJOR (0xffff & (LFS_VERSION >> 16))
26 #define LFS_VERSION_MINOR (0xffff & (LFS_VERSION >> 0))
31 #define LFS_DISK_VERSION 0x00020000
32 #define LFS_DISK_VERSION_MAJOR (0xffff & (LFS_DISK_VERSION >> 16))
33 #define LFS_DISK_VERSION_MINOR (0xffff & (LFS_DISK_VERSION >> 0))
72 LFS_ERR_OK = 0, // No error
92 LFS_TYPE_REG = 0x001,
93 LFS_TYPE_DIR = 0x002,
96 LFS_TYPE_SPLICE = 0x400,
[all …]
DSPEC.md23 - Block pointers are stored in 32 bits, with the special value `0xffffffff`
99 issues. Uses a CRC-32 with a polynomial of `0x04c11db7` initialized
100 with `0xffffffff`.
107 tags XORed together, starting with `0xffffffff`.
112 .-------------------. 0xffffffff .-------------------.
115 | tag ~A |---> xor -> tag A | tag ~A |---> xor -> 0xffffffff
225 Another thing to note is that both the tags `0x00000000` and `0xffffffff` are
234 `0x000` is invalid and not assigned a type.
245 special value `0x3ff` is used for any tags that are not associated with a
249 `0x3ff` indicates that this tag has been deleted.
[all …]
/littlefs-2.7.6/bd/
Dlfs_filebd.c31 if (bd->fd < 0) { in lfs_filebd_createcfg()
37 LFS_FILEBD_TRACE("lfs_filebd_createcfg -> %d", 0); in lfs_filebd_createcfg()
38 return 0; in lfs_filebd_createcfg()
62 if (err < 0) { in lfs_filebd_destroy()
67 LFS_FILEBD_TRACE("lfs_filebd_destroy -> %d", 0); in lfs_filebd_destroy()
68 return 0; in lfs_filebd_destroy()
74 "0x%"PRIx32", %"PRIu32", %p, %"PRIu32")", in lfs_filebd_read()
79 LFS_ASSERT(off % cfg->read_size == 0); in lfs_filebd_read()
80 LFS_ASSERT(size % cfg->read_size == 0); in lfs_filebd_read()
91 if (res1 < 0) { in lfs_filebd_read()
[all …]
Dlfs_rambd.c41 LFS_RAMBD_TRACE("lfs_rambd_createcfg -> %d", 0); in lfs_rambd_createcfg()
42 return 0; in lfs_rambd_createcfg()
67 LFS_RAMBD_TRACE("lfs_rambd_destroy -> %d", 0); in lfs_rambd_destroy()
68 return 0; in lfs_rambd_destroy()
74 "0x%"PRIx32", %"PRIu32", %p, %"PRIu32")", in lfs_rambd_read()
79 LFS_ASSERT(off % cfg->read_size == 0); in lfs_rambd_read()
80 LFS_ASSERT(size % cfg->read_size == 0); in lfs_rambd_read()
86 LFS_RAMBD_TRACE("lfs_rambd_read -> %d", 0); in lfs_rambd_read()
87 return 0; in lfs_rambd_read()
93 "0x%"PRIx32", %"PRIu32", %p, %"PRIu32")", in lfs_rambd_prog()
[all …]
Dlfs_testbd.c48 memset(bd->wear, 0, sizeof(lfs_testbd_wear_t) * cfg->block_count); in lfs_testbd_createcfg()
149 "0x%"PRIx32", %"PRIu32", %p, %"PRIu32")", in lfs_testbd_read()
154 LFS_ASSERT(off % cfg->read_size == 0); in lfs_testbd_read()
155 LFS_ASSERT(size % cfg->read_size == 0); in lfs_testbd_read()
174 "0x%"PRIx32", %"PRIu32", %p, %"PRIu32")", in lfs_testbd_prog()
179 LFS_ASSERT(off % cfg->prog_size == 0); in lfs_testbd_prog()
180 LFS_ASSERT(size % cfg->prog_size == 0); in lfs_testbd_prog()
193 LFS_TESTBD_TRACE("lfs_testbd_prog -> %d", 0); in lfs_testbd_prog()
194 return 0; in lfs_testbd_prog()
206 if (bd->power_cycles > 0) { in lfs_testbd_prog()
[all …]

12