Lines Matching refs:id
329 #define LFS_MKTAG(type, id, size) \ argument
330 (((lfs_tag_t)(type) << 20) | ((lfs_tag_t)(id) << 10) | (lfs_tag_t)(size))
332 #define LFS_MKTAG_IF(cond, type, id, size) \ argument
333 ((cond) ? LFS_MKTAG(type, id, size) : LFS_MKTAG(LFS_FROM_NOOP, 0, 0))
567 uint16_t id, const lfs_block_t pair[2]);
1079 lfs_tag_t fmask, lfs_tag_t ftag, uint16_t *id, in lfs_dir_fetchmatch() argument
1338 if (id) { in lfs_dir_fetchmatch()
1339 *id = lfs_min(lfs_tag_id(besttag), dir->count); in lfs_dir_fetchmatch()
1383 uint16_t id, struct lfs_info *info) { in lfs_dir_getinfo() argument
1384 if (id == 0x3ff) { in lfs_dir_getinfo()
1392 LFS_MKTAG(LFS_TYPE_NAME, id, lfs->name_max+1), info->name); in lfs_dir_getinfo()
1401 LFS_MKTAG(LFS_TYPE_STRUCT, id, sizeof(ctz)), &ctz); in lfs_dir_getinfo()
1447 const char **path, uint16_t *id) { in lfs_dir_find() argument
1450 if (id) { in lfs_dir_find()
1451 *id = 0x3ff; in lfs_dir_find()
1525 (strchr(name, '/') == NULL) ? id : NULL, in lfs_dir_find()
2320 d->id == lfs_tag_id(attrs[i].tag)) { 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()
2330 d->id >= lfs_tag_id(attrs[i].tag)) { in lfs_dir_relocatingcommit()
2331 d->id += 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()
2581 uint16_t id; in lfs_rawmkdir() local
2582 err = lfs_dir_find(lfs, &cwd.m, &path, &id); in lfs_rawmkdir()
2583 if (!(err == LFS_ERR_NOENT && id != 0x3ff)) { in lfs_rawmkdir()
2632 cwd.id = 0; in lfs_rawmkdir()
2654 {LFS_MKTAG(LFS_TYPE_CREATE, id, 0), NULL}, in lfs_rawmkdir()
2655 {LFS_MKTAG(LFS_TYPE_DIR, id, nlen), path}, in lfs_rawmkdir()
2656 {LFS_MKTAG(LFS_TYPE_DIRSTRUCT, id, 8), dir.pair}, in lfs_rawmkdir()
2702 dir->id = 0; in lfs_dir_rawopen()
2736 if (dir->id == dir->m.count) { in lfs_dir_rawread()
2746 dir->id = 0; in lfs_dir_rawread()
2749 int err = lfs_dir_getinfo(lfs, &dir->m, dir->id, info); in lfs_dir_rawread()
2754 dir->id += 1; in lfs_dir_rawread()
2776 dir->id = (off > 0 && lfs_pair_cmp(dir->head, lfs->root) == 0); in lfs_dir_rawseek()
2779 if (dir->id == dir->m.count) { in lfs_dir_rawseek()
2789 dir->id = 0; in lfs_dir_rawseek()
2792 int diff = lfs_min(dir->m.count - dir->id, off); in lfs_dir_rawseek()
2793 dir->id += diff; in lfs_dir_rawseek()
2813 dir->id = 0; in lfs_dir_rawrewind()
3036 lfs_stag_t tag = lfs_dir_find(lfs, &file->m, &path, &file->id);
3037 if (tag < 0 && !(tag == LFS_ERR_NOENT && file->id != 0x3ff)) {
3066 {LFS_MKTAG(LFS_TYPE_CREATE, file->id, 0), NULL},
3067 {LFS_MKTAG(LFS_TYPE_REG, file->id, nlen), path},
3068 {LFS_MKTAG(LFS_TYPE_INLINESTRUCT, file->id, 0), NULL}));
3088 tag = LFS_MKTAG(LFS_TYPE_INLINESTRUCT, file->id, 0);
3094 LFS_MKTAG(LFS_TYPE_STRUCT, file->id, 8), &file->ctz);
3109 file->id, file->cfg->attrs[i].size),
3157 LFS_MKTAG(LFS_TYPE_STRUCT, file->id,
3232 LFS_MKTAG(LFS_TYPE_INLINESTRUCT, file->id, 0),
3409 {LFS_MKTAG(type, file->id, size), buffer},
3410 {LFS_MKTAG(LFS_FROM_USERATTRS, file->id,
3462 LFS_MKTAG(LFS_TYPE_INLINESTRUCT, file->id, 0),
3867 dir.id = 0;
3979 prevdir.id = 0;
4046 uint16_t id = lfs_tag_id(tag); local
4047 if (id == 0x3ff) {
4049 id = 0;
4058 id, lfs_min(size, lfs->attr_max)),
4080 uint16_t id = lfs_tag_id(tag); local
4081 if (id == 0x3ff) {
4083 id = 0;
4091 {LFS_MKTAG(LFS_TYPE_USERATTR + type, id, size), buffer}));
4591 for (uint16_t id = 0; id < dir.count; id++) { local
4594 LFS_MKTAG(LFS_TYPE_STRUCT, id, sizeof(ctz)), &ctz);
4771 uint16_t id, const lfs_block_t pair[2]) { argument
4773 ((id != 0x3ff) ? LFS_MKTAG(LFS_TYPE_DELETE, id, 0) : 0));
4774 lfs->gstate.pair[0] = (id != 0x3ff) ? pair[0] : 0;
4775 lfs->gstate.pair[1] = (id != 0x3ff) ? pair[1] : 0;
5599 uint16_t id; local
5600 err = lfs_dir_find(lfs, &dir2, &(const char*){name}, &id);
5601 if (!(err == LFS_ERR_NOENT && id != 0x3ff)) {
5608 {LFS_MKTAG(LFS_TYPE_CREATE, id, 0), NULL},
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)),