diff options
author | vda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-10-29 19:07:01 +0000 |
---|---|---|
committer | vda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-10-29 19:07:01 +0000 |
commit | 28b74944475f1fd0249ce796183937d00576d537 (patch) | |
tree | 52f5401ce1e1ee881aaa656ce94764a92fad7609 /libbb | |
parent | 7a4e84e0f416107b4c1f09caf84ad16e497b6659 (diff) | |
download | busybox-w32-28b74944475f1fd0249ce796183937d00576d537.tar.gz busybox-w32-28b74944475f1fd0249ce796183937d00576d537.tar.bz2 busybox-w32-28b74944475f1fd0249ce796183937d00576d537.zip |
find: a lot more compliant to 'standard' find
(we were not respecting order of actions!).
Add -o and -a handling.
git-svn-id: svn://busybox.net/trunk/busybox@16469 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/recursive_action.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libbb/recursive_action.c b/libbb/recursive_action.c index ddaf9b896..05ff5d84f 100644 --- a/libbb/recursive_action.c +++ b/libbb/recursive_action.c | |||
@@ -27,7 +27,14 @@ static int true_action(const char *fileName, struct stat *statbuf, void* userDat | |||
27 | return TRUE; | 27 | return TRUE; |
28 | } | 28 | } |
29 | 29 | ||
30 | /* | 30 | /* fileAction return value of 0 on any file in directory will make |
31 | * recursive_action() return 0, but it doesn't stop directory traversal | ||
32 | * (fileAction/dirAction will be called on each file). | ||
33 | * | ||
34 | * if !depthFirst, dirAction return value of 0 (FALSE) or 2 (SKIP) | ||
35 | * prevents recursion into that directory, instead | ||
36 | * recursive_action() returns 0 (if FALSE) or 1 (if SKIP). | ||
37 | * | ||
31 | * followLinks=0/1 differs mainly in handling of links to dirs. | 38 | * followLinks=0/1 differs mainly in handling of links to dirs. |
32 | * 0: lstat(statbuf). Calls fileAction on link name even if points to dir. | 39 | * 0: lstat(statbuf). Calls fileAction on link name even if points to dir. |
33 | * 1: stat(statbuf). Calls dirAction and optionally recurse on link to dir. | 40 | * 1: stat(statbuf). Calls dirAction and optionally recurse on link to dir. |