/titanic_51/usr/src/lib/libc/port/gen/ |
H A D | readdir.c | 62 readdir(DIR *dirp) in readdir() argument 67 if (dirp->dd_size != 0) { in readdir() 68 dp = (dirent_t *)(uintptr_t)&dirp->dd_buf[dirp->dd_loc]; in readdir() 69 saveloc = dirp->dd_loc; /* save for possible EOF */ in readdir() 70 dirp->dd_loc += (int)dp->d_reclen; in readdir() 72 if (dirp->dd_loc >= dirp->dd_size) in readdir() 73 dirp->dd_loc = dirp in readdir() 93 readdir64(DIR * dirp) readdir64() argument 134 readdir(DIR * dirp) readdir() argument [all...] |
H A D | readdir_r.c | 58 readdir_r(DIR *dirp, dirent_t *entry, dirent_t **result) in readdir_r() argument 60 private_DIR *pdirp = (private_DIR *)dirp; in readdir_r() 65 if (dirp->dd_size != 0) { in readdir_r() 66 dp = (dirent_t *)(uintptr_t)&dirp->dd_buf[dirp->dd_loc]; in readdir_r() 67 saveloc = dirp->dd_loc; /* save for possible EOF */ in readdir_r() 68 dirp->dd_loc += (int)dp->d_reclen; in readdir_r() 71 if (dirp->dd_loc >= dirp->dd_size) in readdir_r() 72 dirp in readdir_r() 103 readdir64_r(DIR * dirp,dirent64_t * entry,dirent64_t ** result) readdir64_r() argument 156 __posix_readdir_r(DIR * dirp,dirent_t * entry,dirent_t ** result) __posix_readdir_r() argument 192 readdir_r(DIR * dirp,dirent_t * entry) readdir_r() argument [all...] |
H A D | seekdir.c | 53 seekdir(DIR *dirp, long loc) in seekdir() argument 55 private_DIR *pdirp = (private_DIR *)dirp; in seekdir() 60 if (lseek(dirp->dd_fd, 0, SEEK_CUR) != 0) { in seekdir() 61 dp = (dirent_t *)(uintptr_t)&dirp->dd_buf[dirp->dd_loc]; in seekdir() 65 dirp->dd_loc = 0; in seekdir() 66 (void) lseek(dirp->dd_fd, loc, SEEK_SET); in seekdir() 67 dirp->dd_size = 0; in seekdir() 73 ((dirent_t *)(uintptr_t)&dirp->dd_buf[0])->d_off = loc; in seekdir() 86 seekdir64(DIR *dirp, off64_ argument 122 seekdir(DIR * dirp,long loc) seekdir() argument [all...] |
H A D | _xftw.c | 143 DIR *dirp; in fwalk() local 183 dirp = nocdopendir(path, vp); in fwalk() 191 if (dirp == NULL) in fwalk() 197 (void) closedir(dirp); in fwalk() 206 while (direntp = readdir(dirp)) { in fwalk() 217 (void) closedir(dirp); in fwalk() 233 here = telldir(dirp); in fwalk() 234 if (closedir(dirp) < 0) { in fwalk() 248 (void) closedir(dirp); in fwalk() 256 dirp in fwalk() 279 char *dirp, *token, *ptr; nocdopendir() local 325 char *dirp, *token, *ptr; nocdstat() local [all...] |
H A D | telldir.c | 55 telldir(DIR *dirp) in telldir() argument 57 private_DIR *pdirp = (private_DIR *)dirp; in telldir() 63 if (lseek(dirp->dd_fd, 0, SEEK_CUR) != 0) { in telldir() 64 dp = (dirent_t *)(uintptr_t)(&dirp->dd_buf[dirp->dd_loc]); in telldir() 79 telldir64(DIR *dirp) in telldir64() argument 81 private_DIR *pdirp = (private_DIR *)(uintptr_t)dirp; in telldir64() 87 if (lseek64(dirp->dd_fd, 0, SEEK_CUR) != 0) { in telldir64() 88 dp64 = (dirent64_t *)(uintptr_t)(&dirp->dd_buf[dirp in telldir64() 106 telldir(DIR * dirp) telldir() argument [all...] |
H A D | fdopendir.c | 53 DIR *dirp = (DIR *)pdirp; in fdopendir() local 72 dirp->dd_buf = buf; in fdopendir() 73 dirp->dd_fd = fd; in fdopendir() 74 dirp->dd_loc = 0; in fdopendir() 75 dirp->dd_size = 0; in fdopendir() 77 return (dirp); in fdopendir() 90 dirfd(DIR *dirp) in dirfd() argument 92 return (dirp->dd_fd); in dirfd()
|
H A D | scandir.c | 82 DIR *dirp; in scandir64() local 85 if ((dirp = opendir(dirname)) == NULL) in scandir64() 87 if (fstat64(dirp->dd_fd, &stb) < 0) in scandir64() 103 while ((d = readdir64(dirp)) != NULL) { in scandir64() 138 (void) closedir(dirp); in scandir64() 152 (void) closedir(dirp); in scandir64() 167 DIR *dirp; in scandir() local 170 if ((dirp = opendir(dirname)) == NULL) in scandir() 172 if (fstat64(dirp->dd_fd, &stb) < 0) in scandir() 188 while ((d = readdir(dirp)) ! in scandir() [all...] |
/titanic_51/usr/src/lib/libbc/libc/gen/common/ |
H A D | readdir.c | 36 readdir(dirp) in readdir() argument 37 register DIR *dirp; in readdir() 43 if (dirp->dd_size != 0) { 44 dp = (struct dirent *)&dirp->dd_buf[dirp->dd_loc]; 45 saveloc = dirp->dd_loc; /* save for possible EOF */ 46 dirp->dd_loc += dp->d_reclen; 48 if (dirp->dd_loc >= dirp->dd_size) 49 dirp [all...] |
H A D | seekdir.c | 37 seekdir(dirp, tell) in seekdir() argument 38 register DIR *dirp; in seekdir() 44 curloc = telldir(dirp); 47 dirp->dd_loc = 0; 48 (void) lseek(dirp->dd_fd, tell, 0); 49 dirp->dd_size = 0; 50 dirp->dd_off = tell; 56 rewinddir(dirp) in rewinddir() argument 57 DIR *dirp; in rewinddir() 59 seekdir(dirp, [all...] |
H A D | opendir.c | 42 register DIR *dirp; local 60 if (((dirp = (DIR *)malloc(sizeof(DIR))) == NULL) || 61 ((dirp->dd_buf = malloc(sb.st_blksize)) == NULL)) { 62 if (dirp) 63 free(dirp); 67 dirp->dd_fd = fd; 68 dirp->dd_loc = 0; 69 dirp->dd_size = 0; 70 dirp->dd_bsize = sb.st_blksize; 71 dirp [all...] |
H A D | ftw.c | 114 DIR *dirp; local 153 dirp = opendir(path); 161 if(dirp == NULL) 173 closedir(dirp); 189 while((dp = readdir(dirp)) != NULL) { 202 here = telldir(dirp); 203 closedir(dirp); 214 closedir(dirp); 222 dirp = opendir(path); 223 if(dirp [all...] |
H A D | closedir.c | 36 closedir(dirp) in closedir() argument 37 register DIR *dirp; in closedir() 43 fd = dirp->dd_fd; 44 dirp->dd_fd = -1; 45 dirp->dd_loc = 0; 46 free(dirp->dd_buf); 47 free((char *)dirp);
|
/titanic_51/usr/src/cmd/fs.d/ufs/fsck/ |
H A D | pass2.c | 397 struct direct *dirp = idesc->id_dirp; in pass2check() local 418 if (dirp->d_ino != 0 && strcmp(dirp->d_name, ".") == 0) { in pass2check() 419 if (dirp->d_ino != idesc->id_number) { in pass2check() 421 dirp->d_ino = idesc->id_number; in pass2check() 439 if (dirp->d_ino != 0 && strcmp(dirp->d_name, "..") != 0) { in pass2check() 441 dirp->d_name); in pass2check() 443 } else if ((int)dirp->d_reclen < entrysize) { in pass2check() 446 } else if ((int)dirp in pass2check() [all...] |
/titanic_51/usr/src/ucblib/libucb/port/gen/ |
H A D | readdir.c | 60 internal_readdir(DIR *dirp) in internal_readdir() argument 65 if (dirp->dd_size != 0) { in internal_readdir() 66 dp = (struct dirent64 *)&dirp->dd_buf[dirp->dd_loc]; in internal_readdir() 67 saveloc = dirp->dd_loc; /* save for possible EOF */ in internal_readdir() 68 dirp->dd_loc += dp->d_reclen; in internal_readdir() 70 if (dirp->dd_loc >= dirp->dd_size) in internal_readdir() 71 dirp->dd_loc = dirp in internal_readdir() 97 readdir(DIR * dirp) readdir() argument 119 readdir64(DIR * dirp) readdir64() argument [all...] |
H A D | scandir.c | 81 DIR *dirp; in scandir64() local 83 if ((dirp = opendir(dirname)) == NULL) in scandir64() 85 if (fstat64(dirp->dd_fd, &stb) < 0) in scandir64() 99 while ((d = readdir64(dirp)) != NULL) { in scandir64() 118 if (fstat64(dirp->dd_fd, &stb) < 0) in scandir64() 128 (void) closedir(dirp); in scandir64() 148 DIR *dirp; in scandir() local 150 if ((dirp = opendir(dirname)) == NULL) in scandir() 152 if (fstat64(dirp->dd_fd, &stb) < 0) in scandir() 169 while ((d = readdir(dirp)) ! in scandir() [all...] |
/titanic_51/usr/src/lib/libast/common/dir/ |
H A D | opendir.c | 51 register DIR* dirp = 0; 59 !(dirp = freedirp ? freedirp : 68 if (dirp) 70 if (!freedirp) freedirp = dirp; 71 else free(dirp); 76 dirp->dd_fd = fd; 77 dirp->dd_loc = dirp->dd_size = 0; /* refill needed */ 79 dirp->dd_buf = (void*)((char*)dirp + sizeof(DIR)); 81 return(dirp); 85 closedir(register DIR* dirp) [all …]
|
H A D | readdir.c | 40 readdir(register DIR* dirp) 46 if (dirp->dd_loc >= dirp->dd_size) 48 if (dirp->dd_size < 0) return(0); 49 dirp->dd_loc = 0; 50 if ((dirp->dd_size = getdents(dirp->dd_fd, dirp->dd_buf, DIRBLKSIZ)) <= 0) 53 dp = (struct dirent*)((char*)dirp->dd_buf + dirp->dd_loc); 55 dirp->dd_loc += dp->d_reclen;
|
H A D | seekdir.c | 41 seekdir(register DIR* dirp, long loc) 46 if (telldir(dirp) != loc) 48 lseek(dirp->dd_fd, 0L, SEEK_SET); 49 dirp->dd_loc = dirp->dd_size = 0; 50 while (telldir(dirp) != loc) 51 if (!readdir(dirp))
|
/titanic_51/usr/src/contrib/ast/src/lib/libast/dir/ |
H A D | opendir.c | 46 static DIR* freedirp; /* always keep one dirp */ 51 register DIR* dirp = 0; 61 !(dirp = freedirp ? freedirp : 70 if (dirp) 72 if (!freedirp) freedirp = dirp; 73 else free(dirp); 78 dirp->dd_fd = fd; 79 dirp->dd_loc = dirp->dd_size = 0; /* refill needed */ 81 dirp [all...] |
H A D | readdir.c | 40 readdir(register DIR* dirp) 46 if (dirp->dd_loc >= dirp->dd_size) 48 if (dirp->dd_size < 0) return(0); 49 dirp->dd_loc = 0; 50 if ((dirp->dd_size = getdents(dirp->dd_fd, dirp->dd_buf, DIRBLKSIZ)) <= 0) 53 dp = (struct dirent*)((char*)dirp->dd_buf + dirp [all...] |
H A D | seekdir.c | 41 seekdir(register DIR* dirp, long loc) 46 if (telldir(dirp) != loc) 48 lseek(dirp->dd_fd, 0L, SEEK_SET); 49 dirp->dd_loc = dirp->dd_size = 0; 50 while (telldir(dirp) != loc) 51 if (!readdir(dirp))
|
/titanic_51/usr/src/cmd/backup/dump/ |
H A D | lftw.c | 140 DIR *dirp; in lf_xftw() local 190 dirp = opendir(path); in lf_xftw() 198 if (dirp == NULL) in lf_xftw() 212 if (rc != 0 || dirp == NULL) in lf_xftw() 222 (void) closedir(dirp); in lf_xftw() 240 while ((dp = readdir(dirp)) != NULL) { in lf_xftw() 254 here = telldir(dirp); in lf_xftw() 255 (void) closedir(dirp); in lf_xftw() 266 (void) closedir(dirp); in lf_xftw() 274 dirp in lf_xftw() [all...] |
/titanic_51/usr/src/lib/sun_fc/common/ |
H A D | HBANPIVPort.cc | 76 struct dirent **dirpp, *dirp; in lookupControllerPath() local 89 dirp = (struct dirent *) dir_buf; in lookupControllerPath() 90 dirpp = &dirp; in lookupControllerPath() 91 while ((readdir_r(dp, dirp, dirpp)) == 0 && dirp != NULL) { in lookupControllerPath() 92 if (strcmp(dirp->d_name, ".") == 0 || in lookupControllerPath() 93 strcmp(dirp->d_name, "..") == 0) { in lookupControllerPath() 96 sprintf(node, "%s/%s", dir, dirp->d_name); in lookupControllerPath() 102 cfg_path += dirp->d_name; in lookupControllerPath()
|
/titanic_51/usr/src/contrib/ast/src/lib/libast/preroot/ |
H A D | getpreroot.c | 67 DIR* dirp = 0; in getpreroot() local 102 if (!(dirp = opendir(dots))) ERROR(errno); in getpreroot() 104 if (fstat(dirp->dd_fd, par)) ERROR(errno); in getpreroot() 113 closedir(dirp); in getpreroot() 125 while (entry = readdir(dirp)) in getpreroot() 137 rewinddir(dirp); in getpreroot() 141 if (!(entry = readdir(dirp))) ERROR(ENOENT); in getpreroot() 151 closedir(dirp); in getpreroot() 152 dirp = 0; in getpreroot() 155 if (dirp) closedi in getpreroot() [all...] |
/titanic_51/usr/src/lib/libast/common/preroot/ |
H A D | getpreroot.c | 67 DIR* dirp = 0; in getpreroot() local 102 if (!(dirp = opendir(dots))) ERROR(errno); in getpreroot() 104 if (fstat(dirp->dd_fd, par)) ERROR(errno); in getpreroot() 113 closedir(dirp); in getpreroot() 125 while (entry = readdir(dirp)) in getpreroot() 137 rewinddir(dirp); in getpreroot() 141 if (!(entry = readdir(dirp))) ERROR(ENOENT); in getpreroot() 151 closedir(dirp); in getpreroot() 152 dirp = 0; in getpreroot() 155 if (dirp) closedir(dirp); in getpreroot()
|