aboutsummaryrefslogtreecommitdiff
path: root/lib/lib.h
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2015-05-09 18:11:22 -0500
committerRob Landley <rob@landley.net>2015-05-09 18:11:22 -0500
commitaab9164df395a4b0878b0ad930a5ec8a806a58e9 (patch)
treeae36c520e5ebeaf616755792f67c9e09ff1bbf9f /lib/lib.h
parenta913d92bad6550e005a3ffac71a82586042171b5 (diff)
downloadtoybox-aab9164df395a4b0878b0ad930a5ec8a806a58e9.tar.gz
Add DIRTREE_SHUTUP to disable dirtree warnings if file vanishes out from
under traversal. Pass through full flag set in dirtree_add_node(), add dirtree_start() wrapper to provide symlink-only behavior (avoiding a lot of DIRTREE_SYMFOLLOW*!!(logic) repeated in callers).
Diffstat (limited to 'lib/lib.h')
-rw-r--r--lib/lib.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/lib.h b/lib/lib.h
index be4051eb..03a05703 100644
--- a/lib/lib.h
+++ b/lib/lib.h
@@ -50,6 +50,8 @@ void get_optflags(void);
#define DIRTREE_COMEAGAIN 4
// Follow symlinks to directories
#define DIRTREE_SYMFOLLOW 8
+// Don't warn about failure to stat
+#define DIRTREE_SHUTUP 16
// Don't look at any more files in this directory.
#define DIRTREE_ABORT 256
@@ -65,7 +67,8 @@ struct dirtree {
char name[];
};
-struct dirtree *dirtree_add_node(struct dirtree *p, char *name, int symfollow);
+struct dirtree *dirtree_start(char *name, int symfollow);
+struct dirtree *dirtree_add_node(struct dirtree *p, char *name, int flags);
char *dirtree_path(struct dirtree *node, int *plen);
int dirtree_notdotdot(struct dirtree *catch);
int dirtree_parentfd(struct dirtree *node);