Lines Matching defs:flags
28 struct dirtree *dirtree_add_node(struct dirtree *parent, char *name, int flags)
38 if (fstatat(fd, name, &st,AT_SYMLINK_NOFOLLOW*!(flags&DIRTREE_SYMFOLLOW))) {
39 if (flags&DIRTREE_STATLESS) statless++;
62 if (!(flags&DIRTREE_SHUTUP) && !isdotdot(name)) {
112 int flags;
116 flags = callback(new);
118 if (S_ISDIR(new->st.st_mode) && (flags & (DIRTREE_RECURSE|DIRTREE_COMEAGAIN)))
119 flags = dirtree_recurse(new, callback,
120 openat(dirtree_parentfd(new), new->name, O_CLOEXEC), flags);
123 if (!(flags & DIRTREE_SAVE)) {
128 return (flags & DIRTREE_ABORT)==DIRTREE_ABORT ? DIRTREE_ABORTVAL : new;
135 int (*callback)(struct dirtree *node), int dirfd, int flags)
143 if (!(flags & DIRTREE_SHUTUP)) {
150 return flags;
158 if ((flags&DIRTREE_PROC) && !isdigit(*entry->d_name)) continue;
159 if (!(new = dirtree_add_node(node, entry->d_name, flags))) continue;
170 if (flags & DIRTREE_COMEAGAIN) {
172 flags = callback(node);
179 return flags;
189 struct dirtree *dirtree_flagread(char *path, int flags,
192 return dirtree_handle_callback(dirtree_add_node(0, path, flags), callback);