Searched defs:dirp (Results 1 - 25 of 157) sorted by relevance

1234567

/illumos-gate/usr/src/lib/libbc/libc/gen/common/
H A Dopendir.c42 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 Dftw.c114 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 Dscandir.c46 DIR *dirp; local
48 if ((dirp = opendir(dirname)) == NULL)
50 if (fstat(dirp->dd_fd, &stb) < 0)
63 while ((d = readdir(dirp)) != NULL) {
81 if (fstat(dirp->dd_fd, &stb) < 0)
91 closedir(dirp);
/illumos-gate/usr/src/lib/libc/port/gen/
H A Drewinddir.c43 rewinddir(DIR *dirp) argument
45 (void) seekdir(dirp, 0L);
H A Dclosedir.c49 closedir(DIR *dirp) argument
51 private_DIR *pdirp = (private_DIR *)(uintptr_t)dirp;
52 int fd = dirp->dd_fd;
55 lfree(dirp->dd_buf, DIRBUF);
H A Dopendir.c52 DIR *dirp; local
57 if ((dirp = fdopendir(fd)) == NULL)
59 return (dirp);
H A Dfdopendir.c53 DIR *dirp = (DIR *)pdirp; local
72 dirp->dd_buf = buf;
73 dirp->dd_fd = fd;
74 dirp->dd_loc = 0;
75 dirp->dd_size = 0;
77 return (dirp);
90 dirfd(DIR *dirp) argument
92 return (dirp->dd_fd);
H A Dreaddir.c62 readdir(DIR *dirp) argument
67 if (dirp->dd_size != 0) {
68 dp = (dirent_t *)(uintptr_t)&dirp->dd_buf[dirp->dd_loc];
69 saveloc = dirp->dd_loc; /* save for possible EOF */
70 dirp->dd_loc += (int)dp->d_reclen;
72 if (dirp->dd_loc >= dirp->dd_size)
73 dirp->dd_loc = dirp
93 readdir64(DIR *dirp) argument
134 readdir(DIR *dirp) argument
[all...]
H A Dtelldir.c55 telldir(DIR *dirp) argument
57 private_DIR *pdirp = (private_DIR *)dirp;
63 if (lseek(dirp->dd_fd, 0, SEEK_CUR) != 0) {
64 dp = (dirent_t *)(uintptr_t)(&dirp->dd_buf[dirp->dd_loc]);
79 telldir64(DIR *dirp) argument
81 private_DIR *pdirp = (private_DIR *)(uintptr_t)dirp;
87 if (lseek64(dirp->dd_fd, 0, SEEK_CUR) != 0) {
88 dp64 = (dirent64_t *)(uintptr_t)(&dirp->dd_buf[dirp
106 telldir(DIR *dirp) argument
[all...]
H A Dreaddir_r.c58 readdir_r(DIR *dirp, dirent_t *entry, dirent_t **result) argument
60 private_DIR *pdirp = (private_DIR *)dirp;
65 if (dirp->dd_size != 0) {
66 dp = (dirent_t *)(uintptr_t)&dirp->dd_buf[dirp->dd_loc];
67 saveloc = dirp->dd_loc; /* save for possible EOF */
68 dirp->dd_loc += (int)dp->d_reclen;
71 if (dirp->dd_loc >= dirp->dd_size)
72 dirp
103 readdir64_r(DIR *dirp, dirent64_t *entry, dirent64_t **result) argument
156 __posix_readdir_r(DIR *dirp, dirent_t *entry, dirent_t **result) argument
192 readdir_r(DIR *dirp, dirent_t *entry) argument
[all...]
H A Dseekdir.c53 seekdir(DIR *dirp, long loc) argument
55 private_DIR *pdirp = (private_DIR *)dirp;
60 if (lseek(dirp->dd_fd, 0, SEEK_CUR) != 0) {
61 dp = (dirent_t *)(uintptr_t)&dirp->dd_buf[dirp->dd_loc];
65 dirp->dd_loc = 0;
66 (void) lseek(dirp->dd_fd, loc, SEEK_SET);
67 dirp->dd_size = 0;
73 ((dirent_t *)(uintptr_t)&dirp->dd_buf[0])->d_off = loc;
86 seekdir64(DIR *dirp, off64_ argument
122 seekdir(DIR *dirp, long loc) argument
[all...]
H A Dclosefrom.c60 DIR *dirp; local
70 if ((dirp = opendir("/proc/self/fd")) != NULL) {
75 while ((dp = readdir64(dirp)) != NULL) {
78 (i = atoi(dp->d_name)) == dirp->dd_fd)
86 (void) closedir(dirp);
H A Dscandir.c82 DIR *dirp; local
85 if ((dirp = opendir(dirname)) == NULL)
87 if (fstat64(dirp->dd_fd, &stb) < 0)
103 while ((d = readdir64(dirp)) != NULL) {
138 (void) closedir(dirp);
152 (void) closedir(dirp);
167 DIR *dirp; local
170 if ((dirp = opendir(dirname)) == NULL)
172 if (fstat64(dirp->dd_fd, &stb) < 0)
188 while ((d = readdir(dirp)) !
[all...]
/illumos-gate/usr/src/ucblib/libucb/port/gen/
H A Dreaddir.c60 internal_readdir(DIR *dirp) argument
65 if (dirp->dd_size != 0) {
66 dp = (struct dirent64 *)&dirp->dd_buf[dirp->dd_loc];
67 saveloc = dirp->dd_loc; /* save for possible EOF */
68 dirp->dd_loc += dp->d_reclen;
70 if (dirp->dd_loc >= dirp->dd_size)
71 dirp->dd_loc = dirp
97 readdir(DIR *dirp) argument
119 readdir64(DIR *dirp) argument
[all...]
H A Dscandir.c81 DIR *dirp; local
83 if ((dirp = opendir(dirname)) == NULL)
85 if (fstat64(dirp->dd_fd, &stb) < 0)
99 while ((d = readdir64(dirp)) != NULL) {
118 if (fstat64(dirp->dd_fd, &stb) < 0)
128 (void) closedir(dirp);
148 DIR *dirp; local
150 if ((dirp = opendir(dirname)) == NULL)
152 if (fstat64(dirp->dd_fd, &stb) < 0)
169 while ((d = readdir(dirp)) !
[all...]
/illumos-gate/usr/src/cmd/lp/lib/lp/
H A Dnext.c58 DIR *dirp; local
65 if (!(dirp = Opendir(parent)))
69 Seekdir (dirp, *lastdirp);
72 direntp = Readdir(dirp);
85 *lastdirp = Telldir(dirp);
91 Closedir (dirp);
/illumos-gate/usr/src/cmd/ypcmd/
H A Dypserv_ancil.c65 DIR *dirp; local
86 if ((dirp = opendir(domdir)) == NULL) {
92 for (dp = readdir(dirp); error == YP_TRUE && dp != NULL;
93 dp = readdir(dirp)) {
182 closedir(dirp);
/illumos-gate/usr/src/cmd/sendmail/db/os/
H A Dos_dir.c53 DIR *dirp; local
60 if ((dirp = opendir(dir)) == NULL)
63 for (arraysz = cnt = 0; (dp = readdir(dirp)) != NULL; ++cnt) {
73 (void)closedir(dirp);
/illumos-gate/usr/src/lib/sun_fc/common/
H A DHBANPIVPort.cc76 struct dirent **dirpp, *dirp; local
89 dirp = (struct dirent *) dir_buf;
90 dirpp = &dirp;
91 while ((readdir_r(dp, dirp, dirpp)) == 0 && dirp != NULL) {
92 if (strcmp(dirp->d_name, ".") == 0 ||
93 strcmp(dirp->d_name, "..") == 0) {
96 sprintf(node, "%s/%s", dir, dirp->d_name);
102 cfg_path += dirp->d_name;
/illumos-gate/usr/src/cmd/backup/dump/
H A Dlftw.c140 DIR *dirp; local
190 dirp = opendir(path);
198 if (dirp == NULL)
212 if (rc != 0 || dirp == NULL)
222 (void) closedir(dirp);
240 while ((dp = readdir(dirp)) != NULL) {
254 here = telldir(dirp);
255 (void) closedir(dirp);
266 (void) closedir(dirp);
274 dirp
[all...]
/illumos-gate/usr/src/lib/libproc/common/
H A DPfdinfo.c92 DIR *dirp; local
100 dirp = opendir(dir_name);
101 if (dirp == NULL) {
105 while ((ent = readdir(dirp)) != NULL) {
158 (void) closedir(dirp);
/illumos-gate/usr/src/lib/lvm/libsvm/common/
H A Dmetaconf.c134 DIR *dirp; local
151 if ((dirp = opendir(diskdir)) == NULL) {
157 while (((dp = readdir(dirp)) != (struct dirent *)0) &&
230 (void) closedir(dirp);
/illumos-gate/usr/src/cmd/filesync/
H A Drename.c141 static struct file *find_oldname(struct file *dirp, struct file *new, argument
159 for (fp = dirp->f_files; fp; fp = fp->f_next) {
218 note_rename(struct file *dirp, struct file *new, argument
230 dirp->f_name, old->f_name, dirp->f_name, new->f_name,
/illumos-gate/usr/src/cmd/fs.d/ufs/fsck/
H A Dpass3.c327 struct direct *dirp = idesc->id_dirp; local
334 if (dirp->d_ino == 0)
338 if ((strcmp(dirp->d_name, ".") == 0) ||
339 (strcmp(dirp->d_name, "..") == 0)) {
343 switch (statemap[dirp->d_ino] & ~(INDELAYD)) {
357 dp = ginode(dirp->d_ino);
374 fileerror(idesc->id_number, dirp->d_ino,
377 dirp->d_ino);
378 dp = ginode(dirp->d_ino);
391 statemap[dirp
[all...]
/illumos-gate/usr/src/lib/libast/common/preroot/
H A Dgetpreroot.c67 DIR* dirp = 0; local
102 if (!(dirp = opendir(dots))) ERROR(errno);
104 if (fstat(dirp->dd_fd, par)) ERROR(errno);
113 closedir(dirp);
125 while (entry = readdir(dirp))
137 rewinddir(dirp);
141 if (!(entry = readdir(dirp))) ERROR(ENOENT);
151 closedir(dirp);
152 dirp = 0;
155 if (dirp) closedi
[all...]

Completed in 78 milliseconds

1234567