Lines Matching refs:id

311 #define LFS_MKTAG(type, id, size) \  argument
312 (((lfs_tag_t)(type) << 20) | ((lfs_tag_t)(id) << 10) | (lfs_tag_t)(size))
314 #define LFS_MKTAG_IF(cond, type, id, size) \ argument
315 ((cond) ? LFS_MKTAG(type, id, size) : LFS_MKTAG(LFS_FROM_NOOP, 0, 0))
501 uint16_t id, const lfs_block_t pair[2]);
1004 lfs_tag_t fmask, lfs_tag_t ftag, uint16_t *id, in lfs_dir_fetchmatch() argument
1216 if (id) { in lfs_dir_fetchmatch()
1217 *id = lfs_min(lfs_tag_id(besttag), dir->count); in lfs_dir_fetchmatch()
1266 uint16_t id, struct lfs_info *info) { in lfs_dir_getinfo() argument
1267 if (id == 0x3ff) { in lfs_dir_getinfo()
1275 LFS_MKTAG(LFS_TYPE_NAME, id, lfs->name_max+1), info->name); in lfs_dir_getinfo()
1284 LFS_MKTAG(LFS_TYPE_STRUCT, id, sizeof(ctz)), &ctz); in lfs_dir_getinfo()
1330 const char **path, uint16_t *id) { in lfs_dir_find() argument
1333 if (id) { in lfs_dir_find()
1334 *id = 0x3ff; in lfs_dir_find()
1408 (strchr(name, '/') == NULL) ? id : NULL, in lfs_dir_find()
2149 d->id == lfs_tag_id(attrs[i].tag)) { in lfs_dir_relocatingcommit()
2153 d->id > lfs_tag_id(attrs[i].tag)) { in lfs_dir_relocatingcommit()
2154 d->id -= 1; in lfs_dir_relocatingcommit()
2159 d->id >= lfs_tag_id(attrs[i].tag)) { in lfs_dir_relocatingcommit()
2160 d->id += 1; in lfs_dir_relocatingcommit()
2168 while (d->id >= d->m.count && d->m.split) { in lfs_dir_relocatingcommit()
2170 d->id -= d->m.count; in lfs_dir_relocatingcommit()
2410 uint16_t id; in lfs_rawmkdir() local
2411 err = lfs_dir_find(lfs, &cwd.m, &path, &id); in lfs_rawmkdir()
2412 if (!(err == LFS_ERR_NOENT && id != 0x3ff)) { in lfs_rawmkdir()
2461 cwd.id = 0; in lfs_rawmkdir()
2483 {LFS_MKTAG(LFS_TYPE_CREATE, id, 0), NULL}, in lfs_rawmkdir()
2484 {LFS_MKTAG(LFS_TYPE_DIR, id, nlen), path}, in lfs_rawmkdir()
2485 {LFS_MKTAG(LFS_TYPE_DIRSTRUCT, id, 8), dir.pair}, in lfs_rawmkdir()
2531 dir->id = 0; in lfs_dir_rawopen()
2565 if (dir->id == dir->m.count) { in lfs_dir_rawread()
2575 dir->id = 0; in lfs_dir_rawread()
2578 int err = lfs_dir_getinfo(lfs, &dir->m, dir->id, info); in lfs_dir_rawread()
2583 dir->id += 1; in lfs_dir_rawread()
2605 dir->id = (off > 0 && lfs_pair_cmp(dir->head, lfs->root) == 0); in lfs_dir_rawseek()
2608 int diff = lfs_min(dir->m.count - dir->id, off); in lfs_dir_rawseek()
2609 dir->id += diff; in lfs_dir_rawseek()
2613 if (dir->id == dir->m.count) { in lfs_dir_rawseek()
2623 dir->id = 0; in lfs_dir_rawseek()
2642 dir->id = 0; in lfs_dir_rawrewind()
2865 lfs_stag_t tag = lfs_dir_find(lfs, &file->m, &path, &file->id);
2866 if (tag < 0 && !(tag == LFS_ERR_NOENT && file->id != 0x3ff)) {
2895 {LFS_MKTAG(LFS_TYPE_CREATE, file->id, 0), NULL},
2896 {LFS_MKTAG(LFS_TYPE_REG, file->id, nlen), path},
2897 {LFS_MKTAG(LFS_TYPE_INLINESTRUCT, file->id, 0), NULL}));
2917 tag = LFS_MKTAG(LFS_TYPE_INLINESTRUCT, file->id, 0);
2923 LFS_MKTAG(LFS_TYPE_STRUCT, file->id, 8), &file->ctz);
2938 file->id, file->cfg->attrs[i].size),
2986 LFS_MKTAG(LFS_TYPE_STRUCT, file->id,
3059 LFS_MKTAG(LFS_TYPE_INLINESTRUCT, file->id, 0),
3236 {LFS_MKTAG(type, file->id, size), buffer},
3237 {LFS_MKTAG(LFS_FROM_USERATTRS, file->id,
3289 LFS_MKTAG(LFS_TYPE_INLINESTRUCT, file->id, 0),
3665 dir.id = 0;
3777 prevdir.id = 0;
3844 uint16_t id = lfs_tag_id(tag); local
3845 if (id == 0x3ff) {
3847 id = 0;
3856 id, lfs_min(size, lfs->attr_max)),
3878 uint16_t id = lfs_tag_id(tag); local
3879 if (id == 0x3ff) {
3881 id = 0;
3889 {LFS_MKTAG(LFS_TYPE_USERATTR + type, id, size), buffer}));
4291 for (uint16_t id = 0; id < dir.count; id++) { local
4294 LFS_MKTAG(LFS_TYPE_STRUCT, id, sizeof(ctz)), &ctz);
4447 uint16_t id, const lfs_block_t pair[2]) { argument
4449 ((id != 0x3ff) ? LFS_MKTAG(LFS_TYPE_DELETE, id, 0) : 0));
4450 lfs->gstate.pair[0] = (id != 0x3ff) ? pair[0] : 0;
4451 lfs->gstate.pair[1] = (id != 0x3ff) ? pair[1] : 0;
5150 uint16_t id; local
5151 err = lfs_dir_find(lfs, &dir2, &(const char*){name}, &id);
5152 if (!(err == LFS_ERR_NOENT && id != 0x3ff)) {
5159 {LFS_MKTAG(LFS_TYPE_CREATE, id, 0), NULL},
5161 LFS_TYPE_DIR, id, entry1.d.nlen,
5162 LFS_TYPE_REG, id, entry1.d.nlen),
5165 LFS_TYPE_DIRSTRUCT, id, sizeof(entry1.d.u),
5166 LFS_TYPE_CTZSTRUCT, id, sizeof(entry1.d.u)),