/device/linaro/bootloader/edk2/StdLib/PosixLib/Gen/ |
readdir.c | 61 _readdir_unlocked(DIR *dirp, int skipdeleted)
67 if (dirp->dd_loc >= dirp->dd_size) {
68 if (dirp->dd_flags & __DTF_READALL)
70 dirp->dd_loc = 0;
72 if (dirp->dd_loc == 0 && !(dirp->dd_flags & __DTF_READALL)) {
73 dirp->dd_size = (long)read(dirp->dd_fd, dirp->dd_buf, (size_t)dirp->dd_len); [all...] |
closedir.c | 64 closedir(DIR *dirp)
68 _DIAGASSERT(dirp != NULL);
72 mutex_lock((mutex_t *)dirp->dd_lock);
74 fd = dirp->dd_fd;
75 dirp->dd_fd = -1;
76 dirp->dd_loc = 0;
77 free(dirp->dd_buf);
81 mutex_unlock((mutex_t *)dirp->dd_lock);
82 mutex_destroy((mutex_t *)dirp->dd_lock);
83 free(dirp->dd_lock); [all...] |
opendir.c | 76 DIR *dirp = NULL;
local 91 if ((dirp = (DIR *)malloc(sizeof(DIR))) == NULL)
93 dirp->dd_buf = NULL;
103 dirp->dd_len = incr;
104 dirp->dd_buf = malloc((size_t)dirp->dd_len);
105 if (dirp->dd_buf == NULL)
107 dirp->dd_seek = 0;
110 dirp->dd_loc = 0;
111 dirp->dd_fd = fd; [all...] |
/external/fio/os/windows/posix/include/ |
dirent.h | 21 struct dirent *readdir(DIR *dirp); 22 int closedir(DIR *dirp);
|
/external/ltp/testcases/kernel/syscalls/getdents/ |
getdents.h | 38 getdents(unsigned int fd, struct linux_dirent *dirp, unsigned int size) 40 return ltp_syscall(__NR_getdents, fd, dirp, size);
|
getdents01.c | 77 * Big enough for dirp entires + data, the current size returned 87 struct linux_dirent *dirp; local 99 dirp = buf; 114 rval = getdents(fd, dirp, BUFSIZE); 140 d_reclen = dirp->d_reclen; 141 d_name = dirp->d_name; 153 dirp = (void*)dirp + d_reclen;
|
getdents02.c | 127 struct linux_dirent dirp; local 132 getdents(fd, &dirp, sizeof(dirp));
|
/external/ltp/testcases/kernel/syscalls/readdir/ |
readdir21.c | 57 static struct old_linux_dirent dirp; variable in typeref:struct:old_linux_dirent 63 struct old_linux_dirent *dirp; member in struct:test_case_t 67 {&del_dir_fd, &dirp, sizeof(struct old_linux_dirent), ENOENT}, 68 {&file_fd, &dirp, sizeof(struct old_linux_dirent), ENOTDIR}, 69 {&invalid_fd, &dirp, sizeof(struct old_linux_dirent), EBADF}, 115 test_cases[3].dirp = SAFE_MMAP(cleanup, 0, 1, PROT_NONE, 122 TEST(ltp_syscall(__NR_readdir, *test->fd, test->dirp, test->count));
|
/device/linaro/bootloader/edk2/StdLib/Include/ |
dirent.h | 72 #define dirfd(dirp) ((dirp)->dd_fd)
|
/external/ltp/testcases/network/nfs/nfs_stress/ |
nfs01_open_files.c | 98 DIR *dirp; local 102 dirp = opendir("."); 103 for (entp = readdir(dirp); entp; entp = readdir(dirp))
|
/bionic/libc/bionic/ |
icu.cpp | 49 static int __icu_dat_file_filter(const dirent* dirp) { 50 const char* name = dirp->d_name;
|
fts.c | 552 DIR *dirp; local 566 if ((dirp = opendir(cur->fts_accpath)) == NULL) { 611 if (fts_safe_changedir(sp, cur, dirfd(dirp), NULL)) { 617 (void)closedir(dirp); 618 dirp = NULL; 652 for (head = tail = NULL, nitems = 0; dirp && (dp = readdir(dirp));) { 670 (void)closedir(dirp); 696 (void)closedir(dirp); 725 p->fts_info = fts_stat(sp, p, 0, dirfd(dirp)); [all...] |
/external/rootdev/ |
rootdev.c | 93 DIR *dirp = NULL; local 110 dirp = opendir(basedir); 111 if (!dirp) { 128 closedir(dirp); 137 closedir(dirp); 141 while (readdir_r(dirp, entry, &next) == 0 && next) { 191 closedir(dirp);
|
/hardware/libhardware/modules/sensors/dynamic_sensor/ |
ConnectionDetector.cpp | 150 auto dirp = ::opendir(mPath.c_str()); local 152 while ((dp = ::readdir(dirp)) != NULL) { 158 ::closedir(dirp);
|
/system/vold/ |
Loop.cpp | 114 auto dirp = std::unique_ptr<DIR, int (*)(DIR*)>(opendir(root.c_str()), closedir); local 115 if (!dirp) { 122 while ((de = readdir(dirp.get()))) {
|
vold_prepare_subdirs.cpp | 96 auto dirp = std::unique_ptr<DIR, int (*)(DIR*)>(opendir(path.c_str()), closedir); local 97 if (!dirp) { 104 auto const entry = readdir(dirp.get());
|
/external/compiler-rt/lib/sanitizer_common/ |
sanitizer_linux.h | 32 uptr internal_getdents(fd_t fd, struct linux_dirent *dirp, unsigned int count);
|
/external/ltp/include/ |
safe_macros_fn.h | 169 DIR *dirp); 173 DIR *dirp); 181 DIR *dirp); 185 DIR *dirp);
|
/external/perfetto/src/traced/probes/ |
process_stats_data_source.cc | 52 int32_t ReadNextNumericDir(DIR* dirp) { 53 while (struct dirent* dir_ent = readdir(dirp)) {
|
/external/fio/os/windows/ |
posix.c | 910 int closedir(DIR *dirp) 912 if (dirp != NULL && dirp->find_handle != INVALID_HANDLE_VALUE) 913 FindClose(dirp->find_handle); 915 free(dirp); 919 struct dirent *readdir(DIR *dirp) 924 if (dirp == NULL) 927 if (dirp->find_handle == INVALID_HANDLE_VALUE) { 929 StringCchPrintfA(search_pattern, MAX_PATH-1, "%s\\*", dirp->dirname); 930 dirp->find_handle = FindFirstFileA(search_pattern, &find_data) [all...] |
/system/extras/ext4_utils/ |
ext4_crypt.cpp | 111 auto dirp = std::unique_ptr<DIR, int (*)(DIR*)>(opendir(dirname), closedir); local 112 if (!dirp) { 118 auto entry = readdir(dirp.get());
|
/test/vts/agents/hal/ |
AgentRequestHandler.cpp | 51 struct dirent* dirp; local 53 while ((dirp = readdir(dp)) != NULL) { 54 len = strlen(dirp->d_name); 55 if (len > 3 && !strcmp(&dirp->d_name[len - 3], ".so")) { 56 string found_path = path + "/" + string(dirp->d_name);
|
/cts/tests/tests/jni/libjnitest/ |
android_jni_cts_LinkerNamespacesTest.cpp | 151 std::unique_ptr<DIR, decltype(&closedir)> dirp(opendir(dir.c_str()), closedir); 152 if (dirp == nullptr) { 159 while ((dp = readdir(dirp.get())) != nullptr) {
|
/external/ltp/include/old/ |
safe_macros.h | 325 #define SAFE_CLOSEDIR(cleanup_fn, dirp) \ 326 safe_closedir(__FILE__, __LINE__, (cleanup_fn), (dirp)) 328 #define SAFE_READDIR(cleanup_fn, dirp) \ 329 safe_readdir(__FILE__, __LINE__, (cleanup_fn), (dirp))
|
/external/valgrind/include/ |
pub_tool_libcfile.h | 97 extern Int VG_(getdents64)( Int fd, struct vki_dirent64 *dirp, UInt count );
|