Lines Matching defs:flags
36 struct dirtree *dirtree_add_node(struct dirtree *parent, char *name, int flags)
46 if (fstatat(fd, name, &st,AT_SYMLINK_NOFOLLOW*!(flags&DIRTREE_SYMFOLLOW))) {
47 if (flags&DIRTREE_STATLESS) statless++;
70 if (!(flags&DIRTREE_SHUTUP) && !isdotdot(name)) {
120 int flags;
124 flags = callback(new);
126 if (S_ISDIR(new->st.st_mode) && (flags & (DIRTREE_RECURSE|DIRTREE_COMEAGAIN)))
127 flags = dirtree_recurse(new, callback,
128 openat(dirtree_parentfd(new), new->name, O_CLOEXEC|O_DIRECTORY), flags);
130 if (!(flags & DIRTREE_SAVE)) {
135 return (flags & DIRTREE_ABORT)==DIRTREE_ABORT ? DIRTREE_ABORTVAL : new;
142 int (*callback)(struct dirtree *node), int dirfd, int flags)
150 if (!(flags & DIRTREE_SHUTUP)) {
157 return flags;
165 if ((flags&DIRTREE_PROC) && !isdigit(*entry->d_name)) continue;
166 if (!(new = dirtree_add_node(node, entry->d_name, flags))) continue;
177 if (flags & DIRTREE_COMEAGAIN) {
179 flags = callback(node);
186 return flags;
196 struct dirtree *dirtree_flagread(char *path, int flags,
199 return dirtree_handle_callback(dirtree_add_node(0, path, flags), callback);