Lines Matching refs:tde
359 struct tmpfs_dirent_s *tde; in tmpfs_find_dirent() local
365 tde = (struct tmpfs_dirent_s *)node; in tmpfs_find_dirent()
366 if (tde->tde_inuse == true && strcmp(tde->tde_name, name) == 0) in tmpfs_find_dirent()
368 return tde; in tmpfs_find_dirent()
384 struct tmpfs_dirent_s *tde; in tmpfs_remove_dirent() local
388 tde = to->to_dirent; in tmpfs_remove_dirent()
389 if (tde == NULL) in tmpfs_remove_dirent()
396 if (tde->tde_name != NULL) in tmpfs_remove_dirent()
398 kmm_free(tde->tde_name); in tmpfs_remove_dirent()
399 tde->tde_name = NULL; in tmpfs_remove_dirent()
404 LOS_ListDelete(&tde->tde_node); in tmpfs_remove_dirent()
405 kmm_free(tde); in tmpfs_remove_dirent()
409 tde->tde_inuse = false; in tmpfs_remove_dirent()
410 tde->tde_object = NULL; in tmpfs_remove_dirent()
428 struct tmpfs_dirent_s *tde; in tmpfs_add_dirent() local
441 tde = (struct tmpfs_dirent_s *)malloc(sizeof(struct tmpfs_dirent_s)); in tmpfs_add_dirent()
442 if (tde == NULL) in tmpfs_add_dirent()
448 tde->tde_object = to; in tmpfs_add_dirent()
449 tde->tde_name = newname; in tmpfs_add_dirent()
450 tde->tde_inuse = true; in tmpfs_add_dirent()
451 to->to_dirent = tde; in tmpfs_add_dirent()
456 LOS_ListTailInsert(&parent->tdo_entry, &tde->tde_node); in tmpfs_add_dirent()
520 struct tmpfs_dirent_s *tde; in tmpfs_create_file() local
553 tde = tmpfs_find_dirent(parent, copy); in tmpfs_create_file()
554 if (tde != NULL) in tmpfs_create_file()
663 struct tmpfs_dirent_s *tde; in tmpfs_create_directory() local
697 tde = tmpfs_find_dirent(parent, copy); in tmpfs_create_directory()
698 if (tde != NULL) in tmpfs_create_directory()
775 struct tmpfs_dirent_s *tde; in tmpfs_find_object() local
815 tde = tmpfs_find_dirent(tdo, segment); in tmpfs_find_object()
816 if (tde == NULL) in tmpfs_find_object()
824 to = tde->tde_object; in tmpfs_find_object()
1495 struct tmpfs_dirent_s *tde; in tmpfs_closedir() local
1498 tde = (struct tmpfs_dirent_s *)node; in tmpfs_closedir()
1500 if (tde->tde_inuse == false) in tmpfs_closedir()
1502 LOS_ListDelete(&tde->tde_node); in tmpfs_closedir()
1503 kmm_free(tde); in tmpfs_closedir()
1533 struct tmpfs_dirent_s *tde; in tmpfs_readdir() local
1565 tde = (struct tmpfs_dirent_s *)node; in tmpfs_readdir()
1567 if (tde->tde_inuse == true) in tmpfs_readdir()
1589 to = tde->tde_object; in tmpfs_readdir()
1607 (void)strncpy_s(dir->fd_dir[0].d_name, NAME_MAX + 1, tde->tde_name, NAME_MAX); in tmpfs_readdir()
1780 struct tmpfs_dirent_s *tde = NULL; in tmpfs_lookup() local
1818 tde = tmpfs_find_dirent(parent_tdo, filename); in tmpfs_lookup()
1819 if (tde == NULL) in tmpfs_lookup()
1824 to = tde->tde_object; in tmpfs_lookup()
2195 struct tmpfs_dirent_s *tde; in tmpfs_rename() local
2282 tde = tmpfs_find_dirent(newparent_tdo, copy); in tmpfs_rename()
2283 if (tde != NULL) in tmpfs_rename()
2285 struct tmpfs_object_s *new_to = tde->tde_object; in tmpfs_rename()
2289 if (tde->tde_object->to_type == TMPFS_DIRECTORY) in tmpfs_rename()