Searched refs:dirp (Results 1 - 25 of 127) sorted by relevance

123456

/netbsd-6-1-5-RELEASE/lib/libc/gen/
H A Dreaddir.c57 _readdir_unlocked(DIR *dirp, int skipdeleted) argument
62 if (dirp->dd_loc >= dirp->dd_size) {
63 if (dirp->dd_flags & __DTF_READALL)
65 dirp->dd_loc = 0;
67 if (dirp->dd_loc == 0 && !(dirp->dd_flags & __DTF_READALL)) {
68 dirp->dd_seek = lseek(dirp->dd_fd, (off_t)0, SEEK_CUR);
69 dirp
[all...]
H A Dtelldir.c58 telldir(DIR *dirp)
63 mutex_lock((mutex_t *)dirp->dd_lock);
64 rv = (intptr_t)_telldir_unlocked(dirp);
65 mutex_unlock((mutex_t *)dirp->dd_lock);
68 rv = (intptr_t)_telldir_unlocked(dirp);
76 _telldir_unlocked(DIR *dirp) argument
80 for (lp = dirp->dd_internal; lp; lp = lp->dp_next)
81 if (lp->dp_seek == dirp->dd_seek &&
82 lp->dp_loc == dirp->dd_loc)
88 lp->dp_seek = dirp
101 _seekdir_unlocked(DIR *dirp, long loc) argument
[all...]
H A Drewinddir.c56 rewinddir(DIR *dirp)
62 mutex_lock((mutex_t *)dirp->dd_lock);
65 fd = dirp->dd_fd;
66 _finidir(dirp);
67 dirp->dd_seek = lseek(fd, (off_t)0, SEEK_SET);
68 _initdir(dirp, fd, NULL);
71 mutex_unlock((mutex_t *)dirp->dd_lock);
H A Dclosedir.c62 closedir(DIR *dirp)
66 _DIAGASSERT(dirp != NULL);
70 mutex_lock((mutex_t *)dirp->dd_lock);
72 fd = dirp->dd_fd;
73 dirp->dd_fd = -1;
74 _finidir(dirp);
78 mutex_unlock((mutex_t *)dirp->dd_lock);
79 mutex_destroy((mutex_t *)dirp->dd_lock);
80 free(dirp->dd_lock);
83 free((void *)dirp);
[all...]
H A Dseekdir.c59 seekdir(DIR *dirp, long loc)
64 mutex_lock((mutex_t *)dirp->dd_lock);
65 _seekdir_unlocked(dirp, loc);
66 mutex_unlock((mutex_t *)dirp->dd_lock);
69 _seekdir_unlocked(dirp, loc);
H A Dinitdir.c56 _initdir(DIR *dirp, int fd, const char *name) argument
58 int flags = dirp->dd_flags;
116 dirp->dd_buf = buf;
123 dirp->dd_seek = lseek(fd, (off_t)0, SEEK_CUR);
157 dirp->dd_buf = buf;
166 dirp->dd_buf = buf;
239 dirp->dd_len = len;
240 dirp->dd_size = ddptr - dirp->dd_buf;
242 dirp
260 _finidir(DIR *dirp) argument
[all...]
H A Dopendir.c99 DIR *dirp = NULL; local
109 if ((dirp = malloc(sizeof(*dirp))) == NULL)
111 dirp->dd_buf = NULL;
112 dirp->dd_internal = NULL;
115 if ((dirp->dd_lock = malloc(sizeof(mutex_t))) == NULL)
117 mutex_init((mutex_t *)dirp->dd_lock, NULL);
140 dirp->dd_flags = flags;
141 error = _initdir(dirp, fd, name);
147 return (dirp);
[all...]
H A Dscandir.c92 DIR *dirp; local
97 if ((dirp = opendir(dirname)) == NULL)
100 if ((arraysz = dirsize(dirp->dd_fd, 0)) == 0)
108 while ((d = readdir(dirp)) != NULL) {
117 if ((arraysz = dirsize(dirp->dd_fd, arraysz)) == 0)
138 (void)closedir(dirp);
149 (void)closedir(dirp);
/netbsd-6-1-5-RELEASE/distrib/utils/libhack/
H A Dopendir.c60 DIR *dirp; local
72 (dirp = (DIR *)malloc(sizeof(DIR))) == NULL) {
82 dirp->dd_len = DIRBLKSIZ;
83 dirp->dd_buf = malloc((size_t)dirp->dd_len);
84 if (dirp->dd_buf == NULL) {
85 free(dirp);
89 dirp->dd_seek = 0;
92 dirp->dd_loc = 0;
93 dirp
[all...]
/netbsd-6-1-5-RELEASE/lib/libc/compat/gen/
H A Dcompat__readdir_unlocked30.c17 ___readdir_unlocked30(DIR *dirp) argument
19 return ___readdir_unlocked50(dirp, 1);
H A Dcompat_readdir.c44 readdir(DIR *dirp) argument
47 return direnttodirent12(&d12, __readdir30(dirp));
51 readdir_r(DIR *dirp, struct dirent12 *entry, struct dirent12 **result) argument
56 if ((error = __readdir_r30(dirp, &e, &ep)) != 0)
/netbsd-6-1-5-RELEASE/sbin/fsck_lfs/
H A Dpass2.c204 struct direct *dirp = idesc->id_dirp; local
218 if (dirp->d_ino != 0 && strcmp(dirp->d_name, ".") == 0) {
219 if (dirp->d_ino != idesc->id_number) {
221 dirp->d_ino = idesc->id_number;
225 if (dirp->d_type != DT_DIR) {
227 dirp->d_type = DT_DIR;
239 if (dirp->d_ino != 0 && strcmp(dirp->d_name, "..") != 0) {
241 dirp
[all...]
/netbsd-6-1-5-RELEASE/sbin/fsck_ext2fs/
H A Dpass2.c225 struct ext2fs_direct *dirp = idesc->id_dirp; local
239 if (fs2h32(dirp->e2d_ino) != 0 && dirp->e2d_namlen == 1 &&
240 dirp->e2d_name[0] == '.') {
241 if (fs2h32(dirp->e2d_ino) != idesc->id_number) {
243 dirp->e2d_ino = h2fs32(idesc->id_number);
249 && (dirp->e2d_type != EXT2_FT_DIR)) {
251 dirp->e2d_type = EXT2_FT_DIR;
267 if (fs2h32(dirp->e2d_ino) != 0 && strcmp(dirp
[all...]
/netbsd-6-1-5-RELEASE/sbin/fsck_ffs/
H A Dpass2.c324 struct direct *dirp = idesc->id_dirp; local
337 if (!is_ufs2 && doinglevel2 && iswap32(dirp->d_ino) > 0 &&
338 iswap32(dirp->d_ino) < maxino) {
339 dirp->d_type = inoinfo(iswap32(dirp->d_ino))->ino_type;
347 if (dirp->d_ino != 0 && strcmp(dirp->d_name, ".") == 0) {
348 if (iswap32(dirp->d_ino) != idesc->id_number) {
350 dirp->d_ino = iswap32(idesc->id_number);
356 if (newinofmt && dirp
[all...]
/netbsd-6-1-5-RELEASE/external/bsd/tmux/dist/compat/
H A Dclosefrom.c77 DIR *dirp; local
82 if (len > 0 && (size_t)len <= sizeof(fdpath) && (dirp = opendir(fdpath))) {
83 while ((dent = readdir(dirp)) != NULL) {
86 fd >= 0 && fd < INT_MAX && fd >= lowfd && fd != dirfd(dirp))
89 (void) closedir(dirp);
/netbsd-6-1-5-RELEASE/external/bsd/iscsi/dist/src/initiator/
H A Dvirtdir.c212 VIRTDIR *dirp; local
214 NEW(VIRTDIR, dirp, "openvirtdir", exit(EXIT_FAILURE));
215 dirp->dirname = strdup(d);
216 dirp->dirnamelen = strlen(d);
217 dirp->tp = tp;
218 dirp->i = 0;
219 return dirp;
225 readvirtdir(VIRTDIR *dirp) argument
229 for ( ; dirp->i < dirp
245 closevirtdir(VIRTDIR *dirp) argument
[all...]
/netbsd-6-1-5-RELEASE/share/examples/refuse/virtdir/
H A Dvirtdir.c210 VIRTDIR *dirp; local
212 NEW(VIRTDIR, dirp, "openvirtdir", exit(EXIT_FAILURE));
213 dirp->dirname = strdup(d);
214 dirp->dirnamelen = strlen(d);
215 dirp->tp = tp;
216 dirp->i = 0;
217 return dirp;
223 readvirtdir(VIRTDIR *dirp) argument
227 for ( ; dirp->i < dirp
243 closevirtdir(VIRTDIR *dirp) argument
[all...]
/netbsd-6-1-5-RELEASE/gnu/dist/grep/lib/
H A Dsavedir.c108 DIR *dirp; local
113 dirp = opendir (dir);
114 if (dirp == NULL)
125 closedir (dirp);
130 while ((dp = readdir (dirp)) != NULL)
160 closedir (dirp);
170 if (CLOSEDIR (dirp))
/netbsd-6-1-5-RELEASE/gnu/dist/gmake/
H A Dvmsdir.h57 #define rewinddir(dirp) seekdir((dirp), (long)0)
/netbsd-6-1-5-RELEASE/external/bsd/am-utils/dist/amd/
H A Dinfo_union.c113 DIR *dirp = opendir(*dir); local
114 if (!dirp) {
121 while ((dp = readdir(dirp))) {
133 closedir(dirp);
/netbsd-6-1-5-RELEASE/external/gpl2/xcvs/dist/lib/
H A Dgetcwd.c150 register char *dirp;
188 dirp = dir + allocated;
189 *--dirp = '\0';
320 size_t dirroom = dirp - dir;
342 dirp = memcpy (tmp + allocated - (oldsize - dirroom),
348 dirp -= namlen;
349 memcpy (dirp, d->d_name, namlen);
350 *--dirp = '/';
363 if (dirp == &dir[allocated - 1])
364 *--dirp
149 register char *dirp; local
[all...]
/netbsd-6-1-5-RELEASE/external/gpl3/gcc/dist/gcc/testsuite/gcc.target/cris/
H A Dasmreg-1.c25 __syscall_getdents64 (int fd, char * dirp, unsigned count) argument
29 register unsigned long __r11 __asm__ ("r11") = (unsigned long) dirp;
/netbsd-6-1-5-RELEASE/include/
H A Ddirent.h70 #define dirfd(dirp) ((dirp)->dd_fd)
/netbsd-6-1-5-RELEASE/gnu/dist/gcc4/gcc/testsuite/gcc.dg/
H A Dasmreg-1.c25 __syscall_getdents64 (int fd, char * dirp, unsigned count) argument
29 register unsigned long __r11 __asm__ ("r11") = (unsigned long) dirp;
/netbsd-6-1-5-RELEASE/gnu/dist/gettext/gettext-tools/lib/
H A Dbackupfile.c160 DIR *dirp; local
166 dirp = opendir (dir);
167 if (!dirp)
173 while ((dp = readdir (dirp)) != 0)
182 if (CLOSEDIR (dirp))

Completed in 202 milliseconds

123456