/openbsd-current/lib/libc/gen/ |
H A D | seekdir.c | 29 seekdir(DIR *dirp, long loc) argument 38 _MUTEX_LOCK(&dirp->dd_lock); 39 if (dirp->dd_size && dirp->dd_bufpos == loc) { 40 dirp->dd_loc = 0; 41 dirp->dd_curpos = loc; 42 _MUTEX_UNLOCK(&dirp->dd_lock); 46 for (dirp->dd_loc = 0; 47 dirp->dd_loc < dirp [all...] |
H A D | rewinddir.c | 34 rewinddir(DIR *dirp) argument 36 seekdir(dirp, 0);
|
H A D | readdir.c | 40 _readdir_unlocked(DIR *dirp, struct dirent **result) argument 46 if (dirp->dd_loc >= dirp->dd_size) { 47 dirp->dd_loc = 0; 48 dirp->dd_size = getdents(dirp->dd_fd, dirp->dd_buf, 49 dirp->dd_len); 50 if (dirp->dd_size == 0) 52 if (dirp 72 readdir(DIR *dirp) argument [all...] |
H A D | telldir.c | 39 telldir(DIR *dirp) argument 43 _MUTEX_LOCK(&dirp->dd_lock); 44 i = dirp->dd_curpos; 45 _MUTEX_UNLOCK(&dirp->dd_lock);
|
H A D | closedir.c | 42 closedir(DIR *dirp) argument 46 _MUTEX_LOCK(&dirp->dd_lock); 47 fd = dirp->dd_fd; 48 dirp->dd_fd = -1; 49 free(dirp->dd_buf); 50 _MUTEX_UNLOCK(&dirp->dd_lock); 51 _MUTEX_DESTROY(&dirp->dd_lock); 52 free(dirp);
|
H A D | dirfd.c | 10 dirfd(DIR *dirp) argument 12 return (dirp->dd_fd);
|
H A D | opendir.c | 49 DIR *dirp; local 54 dirp = __fdopendir(fd); 55 if (dirp == NULL) 57 return (dirp); 67 DIR *dirp; local 76 dirp = __fdopendir(fd); 77 if (dirp != NULL) { 79 dirp->dd_bufpos = dirp->dd_curpos = lseek(fd, 0, SEEK_CUR); 87 return (dirp); 94 DIR *dirp; local [all...] |
H A D | readdir_r.c | 39 readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result) argument 43 _MUTEX_LOCK(&dirp->dd_lock); 44 if (_readdir_unlocked(dirp, &dp) != 0) { 45 _MUTEX_UNLOCK(&dirp->dd_lock); 51 _MUTEX_UNLOCK(&dirp->dd_lock);
|
H A D | scandir.c | 63 scandir_dirp(DIR *dirp, struct dirent ***namelist, argument 72 if (fstat(dirp->dd_fd, &stb) == -1) 88 while ((d = readdir(dirp)) != NULL) { 99 if (fstat(dirp->dd_fd, &stb) == -1) 127 closedir(dirp); 138 closedir(dirp); 147 DIR *dirp; local 149 if ((dirp = opendir(dirname)) == NULL) 152 return (scandir_dirp(dirp, namelist, select, dcomp)); 160 DIR *dirp; local [all...] |
H A D | ttyname.c | 115 struct dirent *dirp; local 123 while ((dirp = readdir(dp))) { 124 if (dirp->d_type != DT_CHR && dirp->d_type != DT_UNKNOWN) 126 if (fstatat(dirfd(dp), dirp->d_name, &dsb, AT_SYMLINK_NOFOLLOW) 129 if (dirp->d_namlen > len - sizeof(_PATH_DEV)) { 132 memcpy(buf + sizeof(_PATH_DEV) - 1, dirp->d_name, 133 dirp->d_namlen + 1);
|
H A D | devname.c | 50 DIR *dirp; local 52 if ((dirp = opendir(_PATH_DEV)) == NULL) 54 while ((dp = readdir(dirp)) != NULL) { 57 if (fstatat(dirfd(dirp), dp->d_name, &sb, AT_SYMLINK_NOFOLLOW) 64 closedir(dirp);
|
/openbsd-current/libexec/ld.so/ |
H A D | dir.c | 54 _dl_DIR *dirp; local 60 if (_dl_fstat(fd, &sb) || (dirp = _dl_malloc(sizeof(*dirp))) == NULL) { 65 dirp->dd_fd = fd; 66 dirp->dd_loc = 0; 67 dirp->dd_size = 0; 68 dirp->dd_len = _dl_round_page(sb.st_blksize); 69 dirp->dd_buf = _dl_malloc(dirp->dd_len); 70 if (dirp 84 _dl_closedir(_dl_DIR *dirp) argument 99 _dl_readdir(_dl_DIR *dirp) argument [all...] |
H A D | dir.h | 36 int _dl_closedir(_dl_DIR *dirp); 37 struct dirent *_dl_readdir(_dl_DIR *dirp);
|
/openbsd-current/gnu/usr.bin/cvs/os2/ |
H A D | dirent.c | 34 auto DIR *dirp; local 51 dirp = malloc(sizeof(*dirp)); 52 if (NULL == dirp) 56 dirp->dirname = malloc(len + 5); 57 if (NULL == dirp->dirname) 59 free(dirp); 63 dirp->max_ent = 0; 64 dirp->tot_ent = 0; 65 dirp 132 readdir(DIR *dirp) argument 141 telldir(DIR *dirp) argument 147 seekdir(DIR *dirp, long loc) argument 154 rewinddir(DIR *dirp) argument 161 closedir(DIR *dirp) argument [all...] |
H A D | dirent.h | 44 struct dirent * readdir(DIR *dirp); 45 long telldir(DIR *dirp); 46 void seekdir(DIR *dirp, long loc); 47 void rewinddir(DIR *dirp); 48 void closedir(DIR *dirp);
|
/openbsd-current/gnu/usr.bin/cvs/vms/ |
H A D | ndir.c | 106 register VMS_DIR *dirp; /* -> malloc'ed storage */ local 135 if ((dirp = (VMS_DIR *) xmalloc (sizeof (VMS_DIR))) == 0) 148 dirp->file_spec.dsc$a_pointer = 150 strcpy (dirp->file_spec.dsc$a_pointer, filepattern); 154 dirp->file_spec.dsc$a_pointer = 156 strcpy (dirp->file_spec.dsc$a_pointer, "*.*"); 158 dirp->file_spec.dsc$w_length = strlen (dirp->file_spec.dsc$a_pointer); 159 dirp->file_spec.dsc$b_dtype = DSC$K_DTYPE_T; 160 dirp [all...] |
H A D | ndir.h | 60 #define rewinddir( dirp ) seekdir( dirp, 0L )
|
/openbsd-current/gnu/usr.bin/cvs/windows-NT/ |
H A D | ndir.c | 43 DIR *dirp; 63 dirp = (DIR *) malloc (sizeof (DIR)); 64 if (dirp == (DIR *)0) 67 dirp->dd_loc = 0; 68 dirp->dd_contents = dirp->dd_cp = (struct _dircontents *) 0; 72 free (dirp); 81 free_dircontents (dirp->dd_contents); 89 free_dircontents (dirp->dd_contents); 93 if (dirp 42 DIR *dirp; local 112 closedir(DIR *dirp) argument 120 readdir(DIR *dirp) argument 140 seekdir(DIR *dirp, long off) argument 155 telldir(DIR *dirp) argument [all...] |
H A D | ndir.h | 21 #define rewinddir(dirp) seekdir(dirp, 0L)
|
/openbsd-current/gnu/usr.bin/perl/win32/include/ |
H A D | dirent.h | 46 struct direct * win32_readdir(DIR *dirp); 47 long win32_telldir(DIR *dirp); 48 void win32_seekdir(DIR *dirp,long loc); 49 void win32_rewinddir(DIR *dirp); 50 int win32_closedir(DIR *dirp);
|
/openbsd-current/sbin/fsck_ext2fs/ |
H A D | pass2.c | 194 struct ext2fs_direct *dirp = idesc->id_dirp; local 208 if (letoh32(dirp->e2d_ino) != 0 && dirp->e2d_namlen == 1 && 209 dirp->e2d_name[0] == '.') { 210 if (letoh32(dirp->e2d_ino) != idesc->id_number) { 212 dirp->e2d_ino = htole32(idesc->id_number); 218 && (dirp->e2d_type != EXT2_FT_DIR)) { 220 dirp->e2d_type = EXT2_FT_DIR; 236 if (letoh32(dirp->e2d_ino) != 0 && strcmp(dirp [all...] |
/openbsd-current/sbin/fsck_ffs/ |
H A D | pass2.c | 247 struct direct *dirp = idesc->id_dirp; local 261 if (dirp->d_ino != 0 && strcmp(dirp->d_name, ".") == 0) { 262 if (dirp->d_ino != idesc->id_number) { 264 dirp->d_ino = idesc->id_number; 268 if (dirp->d_type != DT_DIR) { 270 dirp->d_type = DT_DIR; 282 if (dirp->d_ino != 0 && strcmp(dirp->d_name, "..") != 0) { 284 dirp [all...] |
/openbsd-current/sbin/restore/ |
H A D | dirs.c | 103 static RST_DIR *dirp; variable 184 dirp = opendirfile(dirfile); 185 if (dirp == NULL) 249 rst_seekdir(dirp, itp->t_seekpt, itp->t_seekpt); 250 dp = rst_readdir(dirp); /* "." */ 252 dp = rst_readdir(dirp); /* ".." */ 257 dp = rst_readdir(dirp); /* first real entry */ 261 bpt = rst_telldir(dirp); 273 rst_seekdir(dirp, bpt, itp->t_seekpt); 275 dp = rst_readdir(dirp); 454 rst_seekdir(RST_DIR *dirp, long loc, long base) argument 472 rst_readdir(RST_DIR *dirp) argument 515 RST_DIR *dirp; local 531 rst_closedir(RST_DIR *dirp) argument 542 rst_telldir(RST_DIR *dirp) argument 554 RST_DIR *dirp; local [all...] |
/openbsd-current/usr.sbin/amd/amd/ |
H A D | info_union.c | 94 DIR *dirp = opendir(*dir); local 98 if (!dirp) { 106 while ((dp = readdir(dirp))) { 121 closedir(dirp);
|
/openbsd-current/usr.sbin/lpr/common_source/ |
H A D | common.c | 233 DIR *dirp; local 236 dirp = opendir(SD); 238 if (dirp == NULL) 240 if (fstat(dirfd(dirp), &stbuf) < 0) 252 while ((d = readdir(dirp)) != NULL) { 284 closedir(dirp); 296 closedir(dirp); 460 DIR *dirp; local 464 dirp = opendir(spooldir); 467 dirp [all...] |