Lines Matching refs:dir
1322 fat_dir *dir; in fat_opendir() local
1325 dir = malloc_cache_aligned(sizeof(*dir)); in fat_opendir()
1326 if (!dir) in fat_opendir()
1328 memset(dir, 0, sizeof(*dir)); in fat_opendir()
1330 ret = fat_itr_root(&dir->itr, &dir->fsdata); in fat_opendir()
1334 ret = fat_itr_resolve(&dir->itr, filename, TYPE_DIR); in fat_opendir()
1338 *dirsp = (struct fs_dir_stream *)dir; in fat_opendir()
1342 free(dir->fsdata.fatbuf); in fat_opendir()
1344 free(dir); in fat_opendir()
1350 fat_dir *dir = (fat_dir *)dirs; in fat_readdir() local
1351 struct fs_dirent *dent = &dir->dirent; in fat_readdir()
1353 if (!fat_itr_next(&dir->itr)) in fat_readdir()
1357 strcpy(dent->name, dir->itr.name); in fat_readdir()
1359 if (fat_itr_isdir(&dir->itr)) { in fat_readdir()
1363 dent->size = FAT2CPU32(dir->itr.dent->size); in fat_readdir()
1373 fat_dir *dir = (fat_dir *)dirs; in fat_closedir() local
1374 free(dir->fsdata.fatbuf); in fat_closedir()
1375 free(dir); in fat_closedir()