Lines Matching refs:d

2314     for (struct lfs_mlist *d = lfs->mlist; d; d = d->next) {  in lfs_dir_relocatingcommit()  local
2315 if (lfs_pair_cmp(d->m.pair, oldpair) == 0) { in lfs_dir_relocatingcommit()
2316 d->m = *dir; in lfs_dir_relocatingcommit()
2317 if (d->m.pair != pair) { in lfs_dir_relocatingcommit()
2320 d->id == lfs_tag_id(attrs[i].tag)) { in lfs_dir_relocatingcommit()
2321 d->m.pair[0] = LFS_BLOCK_NULL; in lfs_dir_relocatingcommit()
2322 d->m.pair[1] = LFS_BLOCK_NULL; in lfs_dir_relocatingcommit()
2324 d->id > lfs_tag_id(attrs[i].tag)) { in lfs_dir_relocatingcommit()
2325 d->id -= 1; in lfs_dir_relocatingcommit()
2326 if (d->type == LFS_TYPE_DIR) { in lfs_dir_relocatingcommit()
2327 ((lfs_dir_t*)d)->pos -= 1; in lfs_dir_relocatingcommit()
2330 d->id >= lfs_tag_id(attrs[i].tag)) { in lfs_dir_relocatingcommit()
2331 d->id += 1; in lfs_dir_relocatingcommit()
2332 if (d->type == LFS_TYPE_DIR) { in lfs_dir_relocatingcommit()
2333 ((lfs_dir_t*)d)->pos += 1; in lfs_dir_relocatingcommit()
2339 while (d->id >= d->m.count && d->m.split) { in lfs_dir_relocatingcommit()
2341 d->id -= d->m.count; in lfs_dir_relocatingcommit()
2342 int err = lfs_dir_fetch(lfs, &d->m, d->m.tail); in lfs_dir_relocatingcommit()
2433 for (struct lfs_mlist *d = lfs->mlist; d; d = d->next) { in lfs_dir_orphaningcommit() local
2434 if (lfs_pair_cmp(lpair, d->m.pair) == 0) { in lfs_dir_orphaningcommit()
2435 d->m.pair[0] = ldir.pair[0]; in lfs_dir_orphaningcommit()
2436 d->m.pair[1] = ldir.pair[1]; in lfs_dir_orphaningcommit()
2439 if (d->type == LFS_TYPE_DIR && in lfs_dir_orphaningcommit()
2440 lfs_pair_cmp(lpair, ((lfs_dir_t*)d)->head) == 0) { in lfs_dir_orphaningcommit()
2441 ((lfs_dir_t*)d)->head[0] = ldir.pair[0]; in lfs_dir_orphaningcommit()
2442 ((lfs_dir_t*)d)->head[1] = ldir.pair[1]; in lfs_dir_orphaningcommit()
5140 } d; member
5155 } d; member
5171 } d; member
5205 static void lfs1_dir_fromle32(struct lfs1_disk_dir *d) { argument
5206 d->rev = lfs_fromle32(d->rev);
5207 d->size = lfs_fromle32(d->size);
5208 d->tail[0] = lfs_fromle32(d->tail[0]);
5209 d->tail[1] = lfs_fromle32(d->tail[1]);
5212 static void lfs1_dir_tole32(struct lfs1_disk_dir *d) { argument
5213 d->rev = lfs_tole32(d->rev);
5214 d->size = lfs_tole32(d->size);
5215 d->tail[0] = lfs_tole32(d->tail[0]);
5216 d->tail[1] = lfs_tole32(d->tail[1]);
5219 static void lfs1_entry_fromle32(struct lfs1_disk_entry *d) { argument
5220 d->u.dir[0] = lfs_fromle32(d->u.dir[0]);
5221 d->u.dir[1] = lfs_fromle32(d->u.dir[1]);
5224 static void lfs1_entry_tole32(struct lfs1_disk_entry *d) { argument
5225 d->u.dir[0] = lfs_tole32(d->u.dir[0]);
5226 d->u.dir[1] = lfs_tole32(d->u.dir[1]);
5229 static void lfs1_superblock_fromle32(struct lfs1_disk_superblock *d) { argument
5230 d->root[0] = lfs_fromle32(d->root[0]);
5231 d->root[1] = lfs_fromle32(d->root[1]);
5232 d->block_size = lfs_fromle32(d->block_size);
5233 d->block_count = lfs_fromle32(d->block_count);
5234 d->version = lfs_fromle32(d->version);
5240 return 4 + entry->d.elen + entry->d.alen + entry->d.nlen;
5261 if (valid && lfs_scmp(test.rev, dir->d.rev) < 0) {
5292 dir->off = sizeof(dir->d);
5293 dir->d = test;
5306 while (dir->off + sizeof(entry->d) > (0x7fffffff & dir->d.size)-4) {
5307 if (!(0x80000000 & dir->d.size)) {
5312 int err = lfs1_dir_fetch(lfs, dir, dir->d.tail);
5317 dir->off = sizeof(dir->d);
5318 dir->pos += sizeof(dir->d) + 4;
5322 &entry->d, sizeof(entry->d));
5323 lfs1_entry_fromle32(&entry->d);
5359 while (dir.off + sizeof(entry.d) <= (0x7fffffff & dir.d.size)-4) {
5361 &entry.d, sizeof(entry.d));
5362 lfs1_entry_fromle32(&entry.d);
5368 if ((0x70 & entry.d.type) == (0x70 & LFS1_TYPE_REG)) {
5370 entry.d.u.file.head, entry.d.u.file.size, cb, data);
5393 cwd[0] = dir.d.tail[0];
5394 cwd[1] = dir.d.tail[1];
5418 while (!lfs_pair_isnull(cwd.d.tail)) {
5419 err = lfs1_dir_fetch(lfs, &cwd, cwd.d.tail);
5434 if (!(0x80 & entry.d.type) &&
5435 memcmp(&entry.d.u, e, sizeof(entry.d.u)) == 0) {
5473 err = lfs1_bd_read(lfs, dir.pair[0], sizeof(dir.d),
5474 &superblock.d, sizeof(superblock.d));
5475 lfs1_superblock_fromle32(&superblock.d);
5480 lfs->lfs1->root[0] = superblock.d.root[0];
5481 lfs->lfs1->root[1] = superblock.d.root[1];
5484 if (err || memcmp(superblock.d.magic, "littlefs", 8) != 0) {
5491 uint16_t major_version = (0xffff & (superblock.d.version >> 16));
5492 uint16_t minor_version = (0xffff & (superblock.d.version >> 0));
5529 dir1.d.tail[0] = lfs->lfs1->root[0];
5530 dir1.d.tail[1] = lfs->lfs1->root[1];
5531 while (!lfs_pair_isnull(dir1.d.tail)) {
5533 err = lfs1_dir_fetch(lfs, &dir1, dir1.d.tail);
5544 dir2.rev = dir1.d.rev;
5567 if (entry1.d.type & 0x80) {
5568 int moved = lfs1_moved(lfs, &entry1.d.u);
5578 entry1.d.type &= ~0x80;
5585 entry1.off + 4+entry1.d.elen+entry1.d.alen,
5586 name, entry1.d.nlen);
5591 bool isdir = (entry1.d.type == LFS1_TYPE_DIR);
5606 lfs1_entry_tole32(&entry1.d);
5610 LFS_TYPE_DIR, id, entry1.d.nlen,
5611 LFS_TYPE_REG, id, entry1.d.nlen),
5614 LFS_TYPE_DIRSTRUCT, id, sizeof(entry1.d.u),
5615 LFS_TYPE_CTZSTRUCT, id, sizeof(entry1.d.u)),
5616 &entry1.d.u}));
5617 lfs1_entry_fromle32(&entry1.d);
5623 if (!lfs_pair_isnull(dir1.d.tail)) {
5639 {LFS_MKTAG(LFS_TYPE_SOFTTAIL, 0x3ff, 8), dir1.d.tail}));
5693 dir2.rev = dir1.d.rev;