Lines Matching refs:dir
70 DIR *dir; member
81 static int (*real_closedir)(DIR *dir) = 0;
85 static struct dirent *(*real_readdir)(DIR *dir) = 0;
86 static int (*real_readdir_r)(DIR *dir, struct dirent *entry,
88 static struct dirent64 *(*real_readdir64)(DIR *dir) = 0;
89 static int (*real_readdir64_r)(DIR *dir, struct dirent64 *entry,
91 static off_t (*real_telldir)(DIR *dir) = 0;
92 static void (*real_seekdir)(DIR *dir, off_t offset) = 0;
93 static int (*real_dirfd)(DIR *dir) = 0;
189 static struct dir_s *alloc_dirstruct(DIR *dir) in alloc_dirstruct() argument
198 dirstruct->dir = dir; in alloc_dirstruct()
208 while ((d = (*real_readdir64)(dirstruct->dir)) != NULL) { in cache_dirstruct()
242 DIR *dir; in opendir() local
250 dir = (*real_opendir)(name); in opendir()
251 if (!dir) in opendir()
254 dirstruct = alloc_dirstruct(dir); in opendir()
256 (*real_closedir)(dir); in opendir()
275 DIR *dir; in fdopendir() local
283 dir = (*real_fdopendir)(fd); in fdopendir()
284 if (!dir) in fdopendir()
287 dirstruct = alloc_dirstruct(dir); in fdopendir()
289 (*real_closedir)(dir); in fdopendir()
298 dirstruct->dir = dir; in fdopendir()
307 int closedir(DIR *dir) in closedir() argument
309 struct dir_s *dirstruct = (struct dir_s *) dir; in closedir()
312 if (dirstruct->dir) in closedir()
313 (*real_closedir)(dirstruct->dir); in closedir()
320 struct dirent *readdir(DIR *dir) in readdir() argument
322 struct dir_s *dirstruct = (struct dir_s *) dir; in readdir()
326 return (*real_readdir)(dirstruct->dir); in readdir()
342 int readdir_r(DIR *dir, struct dirent *entry, struct dirent **result) in readdir_r() argument
344 struct dir_s *dirstruct = (struct dir_s *) dir; in readdir_r()
348 return (*real_readdir_r)(dirstruct->dir, entry, result); in readdir_r()
366 struct dirent64 *readdir64(DIR *dir) in readdir64() argument
368 struct dir_s *dirstruct = (struct dir_s *) dir; in readdir64()
372 return (*real_readdir64)(dirstruct->dir); in readdir64()
388 int readdir64_r (DIR *__restrict dir, in readdir64_r() argument
392 struct dir_s *dirstruct = (struct dir_s *) dir; in readdir64_r()
396 return (*real_readdir64_r)(dir, entry, result); in readdir64_r()
414 off_t telldir(DIR *dir) in telldir() argument
416 struct dir_s *dirstruct = (struct dir_s *) dir; in telldir()
419 return (*real_telldir)(dirstruct->dir); in telldir()
424 void seekdir(DIR *dir, off_t offset) in seekdir() argument
426 struct dir_s *dirstruct = (struct dir_s *) dir; in seekdir()
429 (*real_seekdir)(dirstruct->dir, offset); in seekdir()
436 void rewinddir(DIR *dir) in rewinddir() argument
438 struct dir_s *dirstruct = (struct dir_s *) dir; in rewinddir()
440 (*real_rewinddir)(dirstruct->dir); in rewinddir()
451 int dirfd(DIR *dir) in dirfd() argument
453 struct dir_s *dirstruct = (struct dir_s *) dir; in dirfd()
454 int fd = (*real_dirfd)(dirstruct->dir); in dirfd()