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

12345

/freebsd-current/lib/libc/gen/
H A Drewinddir.c44 rewinddir(DIR *dirp) argument
48 _pthread_mutex_lock(&dirp->dd_lock);
49 dirp->dd_flags &= ~__DTF_SKIPREAD; /* current contents are invalid */
50 if (dirp->dd_flags & __DTF_READALL)
51 _filldir(dirp, false);
53 (void) lseek(dirp->dd_fd, 0, SEEK_SET);
54 dirp->dd_seek = 0;
56 dirp->dd_loc = 0;
57 _reclaim_telldir(dirp);
59 _pthread_mutex_unlock(&dirp
[all...]
H A Dclosedir.c48 fdclosedir(DIR *dirp) argument
53 _pthread_mutex_lock(&dirp->dd_lock);
54 fd = dirp->dd_fd;
55 dirp->dd_fd = -1;
56 dirp->dd_loc = 0;
57 free((void *)dirp->dd_buf);
58 free(dirp->dd_compat_de);
59 _reclaim_telldir(dirp);
61 _pthread_mutex_unlock(&dirp->dd_lock);
62 _pthread_mutex_destroy(&dirp
69 closedir(DIR *dirp) argument
[all...]
H A Ddirfd.c38 dirfd(DIR *dirp) argument
41 return (_dirfd(dirp));
H A Dreaddir.c48 _readdir_unlocked(DIR *dirp, int flags) argument
55 if (dirp->dd_loc >= dirp->dd_size) {
56 if (dirp->dd_flags & __DTF_READALL)
58 initial_loc = dirp->dd_loc;
59 dirp->dd_flags &= ~__DTF_SKIPREAD;
60 dirp->dd_loc = 0;
62 if (dirp->dd_loc == 0 &&
63 !(dirp->dd_flags & (__DTF_READALL | __DTF_SKIPREAD))) {
64 initial_seek = dirp
91 readdir(DIR *dirp) argument
104 __readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result) argument
[all...]
H A Dseekdir.c47 seekdir(DIR *dirp, long loc) argument
50 _pthread_mutex_lock(&dirp->dd_lock);
51 _seekdir(dirp, loc);
53 _pthread_mutex_unlock(&dirp->dd_lock);
H A Dtelldir.c49 telldir(DIR *dirp) argument
55 _pthread_mutex_lock(&dirp->dd_lock);
62 if (dirp->dd_seek < (off_t)(1l << DD_SEEK_BITS) &&
63 dirp->dd_loc < (1l << DD_LOC_BITS)) {
65 ddloc.s.loc = dirp->dd_loc;
66 ddloc.s.seek = dirp->dd_seek;
71 LIST_FOREACH(lp, &dirp->dd_td->td_locq, loc_lqe) {
72 if (lp->loc_seek == dirp->dd_seek) {
75 if (lp->loc_loc == dirp->dd_loc)
86 _pthread_mutex_unlock(&dirp
115 _seekdir(DIR *dirp, long loc) argument
174 _fixtelldir(DIR *dirp, long oldseek, long oldloc) argument
192 _reclaim_telldir(DIR *dirp) argument
[all...]
H A Dopendir.c107 * If an error occurs, the existing buffer and state of 'dirp' is left
111 _filldir(DIR *dirp, bool use_current_pos) argument
146 if ((fd2 = _openat(dirp->dd_fd, ".", O_RDONLY | O_CLOEXEC)) == -1)
150 pos = lseek(dirp->dd_fd, 0, SEEK_CUR);
177 n = _getdirentries(fd2, ddptr, space, &dirp->dd_seek);
197 dirp->dd_buf = buf;
252 (dirp->dd_flags & DTF_HIDEW))
265 dirp->dd_len = len;
266 dirp->dd_size = ddptr - dirp
292 DIR *dirp; local
[all...]
H A Dgen-private.h61 #define _dirfd(dirp) ((dirp)->dd_fd)
64 int __readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result);
H A Dreaddir-compat11.c67 freebsd11_readdir(DIR *dirp) argument
73 _pthread_mutex_lock(&dirp->dd_lock);
74 dp = _readdir_unlocked(dirp, RDU_SKIP);
76 if (dirp->dd_compat_de == NULL)
77 dirp->dd_compat_de = malloc(sizeof(struct
79 if (freebsd11_cvtdirent(dirp->dd_compat_de, dp))
80 dstdp = dirp->dd_compat_de;
86 _pthread_mutex_unlock(&dirp->dd_lock);
92 freebsd11_readdir_r(DIR *dirp, struct freebsd11_dirent *entry, argument
98 error = __readdir_r(dirp,
[all...]
H A Dscandir.c67 scandir_b_dirp(DIR *dirp, struct dirent ***namelist, select_block select, argument
70 scandir_dirp(DIR *dirp, struct dirent ***namelist,
84 while ((d = readdir(dirp)) != NULL) {
116 closedir(dirp);
131 closedir(dirp);
145 DIR *dirp; local
147 dirp = opendir(dirname);
148 if (dirp == NULL)
156 (dirp, namelist, select, dcomp));
165 DIR *dirp; local
[all...]
H A Dscandir-compat11.c67 DIR *dirp; local
69 if ((dirp = opendir(dirname)) == NULL)
79 while ((d = freebsd11_readdir(dirp)) != NULL) {
111 closedir(dirp);
122 closedir(dirp);
H A Dtelldir.h105 void _fixtelldir(DIR *dirp, long oldseek, long oldloc);
/freebsd-current/lib/libc/tests/gen/
H A Ddir2_test.c54 DIR *dirp; local
79 dirp = fdopendir(dirfd);
81 beginning = telldir(dirp);
83 de = readdir(dirp);
86 middle = telldir(dirp);
88 de = readdir(dirp);
91 end = telldir(dirp);
99 seekdir(dirp, beginning);
100 td = telldir(dirp);
102 ATF_REQUIRE_MSG(NULL != readdir(dirp), "invali
130 DIR *dirp; local
[all...]
/freebsd-current/sbin/fsck_ffs/
H A Dpass2.c280 struct direct *dirp = idesc->id_dirp; local
294 if (dirp->d_ino != 0 && strcmp(dirp->d_name, ".") == 0) {
295 if (dirp->d_ino != idesc->id_number) {
298 dirp->d_ino = idesc->id_number;
302 if (dirp->d_type != DT_DIR) {
305 dirp->d_type = DT_DIR;
318 if (dirp->d_reclen < entrysize + DIRSIZ(0, dirp)) {
320 if (dirp
714 struct direct *dirp = idesc->id_dirp; local
[all...]
/freebsd-current/share/examples/sunrpc/dir/
H A Ddir_proc.c16 DIR *dirp; local
25 dirp = opendir(*dirname);
26 if (dirp == NULL) {
40 while (d = readdir(dirp)) {
52 closedir(dirp);
/freebsd-current/tools/test/stress2/misc/
H A Dseekdir.sh49 SeekDir(DIR *dirp, long loc)
52 seekdir(dirp, loc);
56 TellDir(DIR *dirp)
60 loc = telldir(dirp);
68 DIR *dirp;
94 dirp = opendir(".");
95 offset = TellDir(dirp);
110 if ((dp = readdir(dirp)) != NULL) {
117 offset = TellDir(dirp);
132 SeekDir(dirp, prev_offse
[all...]
/freebsd-current/sbin/restore/
H A Ddirs.c103 static RST_DIR *dirp; variable
183 dirp = opendirfile(dirfile);
184 if (dirp == NULL)
238 rst_seekdir(dirp, itp->t_seekpt, itp->t_seekpt);
239 dp = rst_readdir(dirp); /* "." */
241 dp = rst_readdir(dirp); /* ".." */
246 dp = rst_readdir(dirp); /* first real entry */
250 bpt = rst_telldir(dirp);
262 rst_seekdir(dirp, bpt, itp->t_seekpt);
264 dp = rst_readdir(dirp);
431 rst_seekdir(RST_DIR *dirp, long loc, long base) argument
449 rst_readdir(RST_DIR *dirp) argument
492 RST_DIR *dirp; local
510 RST_DIR *dirp; local
522 rst_telldir(RST_DIR *dirp) argument
534 RST_DIR *dirp; local
[all...]
/freebsd-current/usr.sbin/rpc.umntall/
H A Dmounttab.c55 add_mtab(char *hostp, char *dirp) argument
63 (long)time(NULL), hostp, dirp);
76 char *hostp, *dirp, *cp; local
108 dirp = strsep(&cp, " \t\n");
109 if (dirp == NULL || *dirp == '\0') {
110 badline("dir", dirp);
127 memmove(mtabp->mtab_dirp, dirp, MNTPATHLEN);
186 clean_mtab(char *hostp, char *dirp, int verbose) argument
196 if (dirp !
[all...]
H A Drpc.umntall.c194 * Send a RPC_MNT UMOUNT request for dirp to hostname.
197 do_umount(char *hostname, char *dirp) { argument
211 clnt_stat = clnt_call(clp, MOUNTPROC_UMNT, (xdrproc_t)xdr_dir, dirp,
224 is_mounted(char *hostname, char *dirp) { argument
230 if (strlen(hostname) + strlen(dirp) >= MNAMELEN)
232 snprintf(name, sizeof(name), "%s:%s", hostname, dirp);
254 xdr_dir(XDR *xdrsp, char *dirp) { argument
255 return (xdr_string(xdrsp, &dirp, MNTPATHLEN));
/freebsd-current/contrib/kyua/utils/fs/
H A Dlua_module.cpp177 DIR** dirp = state.to_userdata< DIR* >(state.upvalue_index(1)); local
178 const struct dirent* entry = ::readdir(*dirp);
207 DIR** dirp = state.to_userdata< DIR* >(-1); local
210 if (*dirp != NULL) {
211 ::closedir(*dirp);
212 *dirp = NULL;
234 DIR** dirp = state.new_userdata< DIR* >(); local
243 *dirp = ::opendir(path.c_str());
244 if (*dirp == NULL) {
/freebsd-current/tools/build/cross-build/
H A Dclosefrom.c130 DIR *dirp; local
144 dirp = opendir(path);
145 if (dirp == NULL)
148 while ((dent = readdir(dirp)) != NULL) {
153 if (errstr != NULL || fd == dirfd(dirp))
179 (void)closedir(dirp);
/freebsd-current/crypto/openssh/openbsd-compat/
H A Dbsd-closefrom.c128 DIR *dirp; local
138 if (len > 0 && (size_t)len < sizeof(fdpath) && (dirp = opendir(fdpath))) {
139 while ((dent = readdir(dirp)) != NULL) {
142 fd >= 0 && fd < INT_MAX && fd >= lowfd && fd != dirfd(dirp))
145 (void) closedir(dirp);
/freebsd-current/usr.sbin/lpr/lpq/
H A Dlpq.c161 DIR *dirp; local
165 if ((dirp = opendir(spooldir)) == NULL)
167 while ((d = readdir(dirp)) != NULL) {
170 closedir(dirp);
173 closedir(dirp);
/freebsd-current/libexec/tftpd/
H A Dtftpd.c193 struct dirlist *dirp; local
196 for (dirp = dirs; optind < argc && dirp < &dirs[MAXDIRS];
199 dirp->name = argv[optind];
200 dirp->len = strlen(dirp->name);
201 dirp++;
686 struct dirlist *dirp; local
703 for (dirp = dirs; dirp
[all...]
/freebsd-current/usr.bin/patch/
H A Dbackupfile.c94 DIR *dirp; local
99 dirp = opendir(dir);
100 if (dirp == NULL)
106 while ((dp = readdir(dirp)) != NULL) {
114 closedir(dirp);

Completed in 242 milliseconds

12345