find: -follow should not error out on dandling links
function old new delta
recursive_action 425 465 +40
find_main 436 465 +29
test_main 247 253 +6
need_print 1 - -1
doCommands 2523 2521 -2
compare_keys 737 735 -2
xdev_dev 4 - -4
xdev_count 4 - -4
recurse_flags 4 - -4
mkfs_vfat_main 1609 1605 -4
actions 4 - -4
fileAction 588 583 -5
------------------------------------------------------------------------------
(add/remove: 0/5 grow/shrink: 3/4 up/down: 75/-30) Total: 45 bytes
text data bss dec hex filename
822711 450 7684 830845 cad7d busybox_old
822773 445 7668 830886 cada6 busybox_unstripped
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
diff --git a/include/libbb.h b/include/libbb.h
index 8ecde5b..a02355c 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -286,7 +286,9 @@
ACTION_DEPTHFIRST = (1 << 3),
/*ACTION_REVERSE = (1 << 4), - unused */
ACTION_QUIET = (1 << 5),
+ ACTION_DANGLING_OK = (1 << 6),
};
+typedef uint8_t recurse_flags_t;
extern int recursive_action(const char *fileName, unsigned flags,
int FAST_FUNC (*fileAction)(const char *fileName, struct stat* statbuf, void* userData, int depth),
int FAST_FUNC (*dirAction)(const char *fileName, struct stat* statbuf, void* userData, int depth),