diff options
author | Rob Landley <rob@landley.net> | 2019-06-11 23:57:41 -0500 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2019-06-11 23:57:41 -0500 |
commit | dddd1a13a9978cd17e9ad26637a0ce2da1466323 (patch) | |
tree | c7c1304e8b5b2b801d9fe01a5375172f4dc613e1 /lib/lib.h | |
parent | 9d354377a8aea69e19b1785eec32066519052e97 (diff) | |
download | toybox-dddd1a13a9978cd17e9ad26637a0ce2da1466323.tar.gz |
Add DIRTREE_STATLESS to return entries we couldn't stat().
Sets ->again |= 2 when that happens and ->st is zeroed.
While we're there, don't memset(st) and then memcpy(st) over it, and
use O_PATH in the open().
Diffstat (limited to 'lib/lib.h')
-rw-r--r-- | lib/lib.h | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -76,6 +76,8 @@ void get_optflags(void); #define DIRTREE_BREADTH 32 // skip non-numeric entries #define DIRTREE_PROC 64 +// Return files we can't stat +#define DIRTREE_STATLESS 128 // Don't look at any more files in this directory. #define DIRTREE_ABORT 256 @@ -84,9 +86,9 @@ void get_optflags(void); struct dirtree { struct dirtree *next, *parent, *child; long extra; // place for user to store their stuff (can be pointer) - struct stat st; char *symlink; int dirfd; + struct stat st; char again; char name[]; }; |