Searched refs:dirp (Results 1 – 11 of 11) sorted by relevance
61 _readdir_unlocked(DIR *dirp, int skipdeleted) in _readdir_unlocked() argument67 if (dirp->dd_loc >= dirp->dd_size) { in _readdir_unlocked()68 if (dirp->dd_flags & __DTF_READALL) in _readdir_unlocked()70 dirp->dd_loc = 0; in _readdir_unlocked()72 if (dirp->dd_loc == 0 && !(dirp->dd_flags & __DTF_READALL)) { in _readdir_unlocked()73 dirp->dd_size = (long)read(dirp->dd_fd, dirp->dd_buf, (size_t)dirp->dd_len); in _readdir_unlocked()74 if (dirp->dd_size <= 0) in _readdir_unlocked()77 dp = (struct dirent *) (void *)(dirp->dd_buf + (size_t)dirp->dd_loc); in _readdir_unlocked()80 dirp->dd_loc += (long)dp->Size; in _readdir_unlocked()81 if ((dp->Attribute & DT_HIDDEN) && (dirp->dd_flags & DTF_HIDEW)) in _readdir_unlocked()[all …]
76 DIR *dirp = NULL; in __opendir2() local91 if ((dirp = (DIR *)malloc(sizeof(DIR))) == NULL) in __opendir2()93 dirp->dd_buf = NULL; in __opendir2()103 dirp->dd_len = incr; in __opendir2()104 dirp->dd_buf = malloc((size_t)dirp->dd_len); in __opendir2()105 if (dirp->dd_buf == NULL) in __opendir2()107 dirp->dd_seek = 0; in __opendir2()110 dirp->dd_loc = 0; in __opendir2()111 dirp->dd_fd = fd; in __opendir2()112 dirp->dd_flags = flags; in __opendir2()[all …]
64 closedir(DIR *dirp) in __weak_alias()68 _DIAGASSERT(dirp != NULL); in __weak_alias()72 mutex_lock((mutex_t *)dirp->dd_lock); in __weak_alias()74 fd = dirp->dd_fd; in __weak_alias()75 dirp->dd_fd = -1; in __weak_alias()76 dirp->dd_loc = 0; in __weak_alias()77 free(dirp->dd_buf); in __weak_alias()81 mutex_unlock((mutex_t *)dirp->dd_lock); in __weak_alias()82 mutex_destroy((mutex_t *)dirp->dd_lock); in __weak_alias()83 free(dirp->dd_lock); in __weak_alias()[all …]
72 #define dirfd(dirp) ((dirp)->dd_fd) argument
677 DIR *dirp; in glob3() local698 if ((dirp = g_opendir(pathbuf, pglob)) == NULL) { in glob3()725 while ((dp = (*readdirfunc)(dirp)) != NULL) { in glob3()790 (*pglob->gl_closedir)(dirp); in glob3()792 closedir(dirp); in glob3()
959 DIR *dirp; in edk2_listdir() local971 dirp = opendir(name); in edk2_listdir() local973 if (dirp == NULL) { in edk2_listdir()978 closedir(dirp); in edk2_listdir()985 closedir(dirp); in edk2_listdir()994 ep = readdir(dirp); in edk2_listdir()1001 closedir(dirp); in edk2_listdir()1014 closedir(dirp); in edk2_listdir()1053 closedir(dirp); in edk2_listdir()
1709 DIR *dirp; in case_ok()1728 dirp = opendir(dirname); in case_ok()1729 if (dirp) { in case_ok()1731 while ((dp = readdir(dirp)) != NULL) { in case_ok()1740 (void)closedir(dirp); in case_ok()1744 (void)closedir(dirp); in case_ok()
1624 DIR *dirp; in find_module()1643 dirp = opendir(dirname); in find_module()1644 if (dirp) { in find_module()1646 while ((dp = readdir(dirp)) != NULL) { in find_module()1655 (void)closedir(dirp); in find_module()1659 (void)closedir(dirp); in find_module()
958 DIR *dirp; in posix_listdir() local970 dirp = opendir(name); in posix_listdir() local972 if (dirp == NULL) { in posix_listdir()977 closedir(dirp); in posix_listdir()984 closedir(dirp); in posix_listdir()993 ep = readdir(dirp); in posix_listdir()1000 closedir(dirp); in posix_listdir()1013 closedir(dirp); in posix_listdir()1052 closedir(dirp); in posix_listdir()
2326 DIR *dirp; in posix_listdir()2338 dirp = opendir(name); in posix_listdir()2340 if (dirp == NULL) { in posix_listdir()2345 closedir(dirp); in posix_listdir()2353 ep = readdir(dirp); in posix_listdir()2360 closedir(dirp); in posix_listdir()2403 closedir(dirp); in posix_listdir()