Lines Matching refs:idx

40 static TEE_Result maybe_grow_files(struct tee_fs_dirfile_dirh *dirh, int idx)  in maybe_grow_files()  argument
44 if (idx < dirh->nbits) in maybe_grow_files()
47 p = realloc(dirh->files, bitstr_size(idx + 1)); in maybe_grow_files()
52 bit_nclear(dirh->files, dirh->nbits, idx); in maybe_grow_files()
53 dirh->nbits = idx + 1; in maybe_grow_files()
58 static TEE_Result set_file(struct tee_fs_dirfile_dirh *dirh, int idx) in set_file() argument
60 TEE_Result res = maybe_grow_files(dirh, idx); in set_file()
63 bit_set(dirh->files, idx); in set_file()
68 static void clear_file(struct tee_fs_dirfile_dirh *dirh, int idx) in clear_file() argument
70 if (idx < dirh->nbits) in clear_file()
71 bit_clear(dirh->files, idx); in clear_file()
74 static bool test_file(struct tee_fs_dirfile_dirh *dirh, int idx) in test_file() argument
76 if (idx < dirh->nbits) in test_file()
77 return bit_test(dirh->files, idx); in test_file()
82 static TEE_Result read_dent(struct tee_fs_dirfile_dirh *dirh, int idx, in read_dent() argument
89 res = dirh->fops->read(dirh->fh, sizeof(struct dirfile_entry) * idx, in read_dent()
233 dfh->idx = n; in tee_fs_dirfile_find()
279 if (dfh->idx < 0) { in tee_fs_dirfile_rename()
290 dfh->idx = dfh2.idx; in tee_fs_dirfile_rename()
293 return write_dent(dirh, dfh->idx, &dent); in tee_fs_dirfile_rename()
303 res = read_dent(dirh, dfh->idx, &dent); in tee_fs_dirfile_remove()
315 res = write_dent(dirh, dfh->idx, &dent); in tee_fs_dirfile_remove()
328 res = read_dent(dirh, dfh->idx, &dent); in tee_fs_dirfile_update_hash()
336 return write_dent(dirh, dfh->idx, &dent); in tee_fs_dirfile_update_hash()
340 const TEE_UUID *uuid, int *idx, void *oid, in tee_fs_dirfile_get_next() argument
344 int i = *idx + 1; in tee_fs_dirfile_get_next()
364 *idx = i; in tee_fs_dirfile_get_next()