aboutsummaryrefslogtreecommitdiff
path: root/lib/lib.h
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2014-07-26 13:30:40 -0500
committerRob Landley <rob@landley.net>2014-07-26 13:30:40 -0500
commitfec3fd1f8ac1db9ed87b79bd3eb5e38aa835e881 (patch)
treea7e149cf0fefef5d252706797fff8c831ebb0460 /lib/lib.h
parentccb73f8bf9191c01c90975958a210c47175bd98c (diff)
downloadtoybox-fec3fd1f8ac1db9ed87b79bd3eb5e38aa835e881.tar.gz
Move DIRTREE_COMEAGAIN second callback up to when the filehandle is still open, and add dir->again variable to distinguish second call instead of checking for -1 filehandle.
Diffstat (limited to 'lib/lib.h')
-rw-r--r--lib/lib.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/lib.h b/lib/lib.h
index 11a1018c..34c78a26 100644
--- a/lib/lib.h
+++ b/lib/lib.h
@@ -60,7 +60,8 @@ struct dirtree {
long extra; // place for user to store their stuff (can be pointer)
struct stat st;
char *symlink;
- int data; // dirfd for directory, linklen for symlink, -1 = comeagain
+ int data; // dirfd for directory, linklen for symlink
+ char again;
char name[];
};
@@ -70,8 +71,8 @@ int dirtree_notdotdot(struct dirtree *catch);
int dirtree_parentfd(struct dirtree *node);
struct dirtree *dirtree_handle_callback(struct dirtree *new,
int (*callback)(struct dirtree *node));
-void dirtree_recurse(struct dirtree *node,
- int (*callback)(struct dirtree *node), int symfollow);
+int dirtree_recurse(struct dirtree *node, int (*callback)(struct dirtree *node),
+ int symfollow);
struct dirtree *dirtree_read(char *path, int (*callback)(struct dirtree *node));
// help.c