Lines Matching refs:dirp

87 _filldir(DIR *dirp, bool use_current_pos)  in _filldir()  argument
122 if ((fd2 = _openat(dirp->dd_fd, ".", O_RDONLY | O_CLOEXEC)) == -1) in _filldir()
126 pos = lseek(dirp->dd_fd, 0, SEEK_CUR); in _filldir()
153 n = _getdirentries(fd2, ddptr, space, &dirp->dd_seek); in _filldir()
173 dirp->dd_buf = buf; in _filldir()
228 (dirp->dd_flags & DTF_HIDEW)) in _filldir()
241 dirp->dd_len = len; in _filldir()
242 dirp->dd_size = ddptr - dirp->dd_buf; in _filldir()
266 DIR *dirp; in __opendir_common() local
272 if ((dirp = malloc(sizeof(DIR) + sizeof(struct _telldir))) == NULL) in __opendir_common()
275 dirp->dd_buf = NULL; in __opendir_common()
276 dirp->dd_fd = fd; in __opendir_common()
277 dirp->dd_flags = flags; in __opendir_common()
278 dirp->dd_loc = 0; in __opendir_common()
279 dirp->dd_lock = NULL; in __opendir_common()
280 dirp->dd_td = (struct _telldir *)((char *)dirp + sizeof(DIR)); in __opendir_common()
281 LIST_INIT(&dirp->dd_td->td_locq); in __opendir_common()
282 dirp->dd_td->td_loccnt = 0; in __opendir_common()
283 dirp->dd_compat_de = NULL; in __opendir_common()
303 if (!_filldir(dirp, use_current_pos)) in __opendir_common()
305 dirp->dd_flags |= __DTF_READALL; in __opendir_common()
307 dirp->dd_len = incr; in __opendir_common()
308 dirp->dd_buf = malloc(dirp->dd_len); in __opendir_common()
309 if (dirp->dd_buf == NULL) in __opendir_common()
317 ret = _getdirentries(dirp->dd_fd, in __opendir_common()
318 dirp->dd_buf, dirp->dd_len, &dirp->dd_seek); in __opendir_common()
321 dirp->dd_size = (size_t)ret; in __opendir_common()
322 dirp->dd_flags |= __DTF_SKIPREAD; in __opendir_common()
324 dirp->dd_size = 0; in __opendir_common()
325 dirp->dd_seek = 0; in __opendir_common()
329 return (dirp); in __opendir_common()
333 free(dirp->dd_buf); in __opendir_common()
334 free(dirp); in __opendir_common()