diff options
author | vda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-10-27 23:42:25 +0000 |
---|---|---|
committer | vda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-10-27 23:42:25 +0000 |
commit | 155a25478340968f01da4c24c144600f910c323f (patch) | |
tree | 13d20b31e817dcff5124498ca0bec2cdf9781014 /findutils/grep.c | |
parent | 491278531cfa3089ca16ce8a832accfd9771f1e9 (diff) | |
download | busybox-w32-155a25478340968f01da4c24c144600f910c323f.tar.gz busybox-w32-155a25478340968f01da4c24c144600f910c323f.tar.bz2 busybox-w32-155a25478340968f01da4c24c144600f910c323f.zip |
recursive_action: add depth param
chmod: match coreutils versus following links
git-svn-id: svn://busybox.net/trunk/busybox@16462 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'findutils/grep.c')
-rw-r--r-- | findutils/grep.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/findutils/grep.c b/findutils/grep.c index b76a17a41..8bb38f95c 100644 --- a/findutils/grep.c +++ b/findutils/grep.c | |||
@@ -290,7 +290,7 @@ static void load_regexes_from_file(llist_t *fopt) | |||
290 | } | 290 | } |
291 | 291 | ||
292 | 292 | ||
293 | static int file_action_grep(const char *filename, struct stat *statbuf, void* matched) | 293 | static int file_action_grep(const char *filename, struct stat *statbuf, void* matched, int depth) |
294 | { | 294 | { |
295 | FILE *file = fopen(filename, "r"); | 295 | FILE *file = fopen(filename, "r"); |
296 | if (file == NULL) { | 296 | if (file == NULL) { |
@@ -315,7 +315,8 @@ static int grep_dir(const char *dir) | |||
315 | /* depthFirst= */ 1, | 315 | /* depthFirst= */ 1, |
316 | /* fileAction= */ file_action_grep, | 316 | /* fileAction= */ file_action_grep, |
317 | /* dirAction= */ NULL, | 317 | /* dirAction= */ NULL, |
318 | /* userData= */ &matched); | 318 | /* userData= */ &matched, |
319 | /* depth= */ 0); | ||
319 | return matched; | 320 | return matched; |
320 | } | 321 | } |
321 | 322 | ||