summaryrefslogtreecommitdiff
path: root/findutils/grep.c
diff options
context:
space:
mode:
authorDenis Vlasenko2006-10-27 23:42:25 +0000
committerDenis Vlasenko2006-10-27 23:42:25 +0000
commit8c35d65c43216bb840326ac7476a180e2ae36fe9 (patch)
tree13d20b31e817dcff5124498ca0bec2cdf9781014 /findutils/grep.c
parente80e2a3660bf09cc549cb2dfd2bdeb77ccde1231 (diff)
downloadbusybox-8c35d65c43216bb840326ac7476a180e2ae36fe9.zip
busybox-8c35d65c43216bb840326ac7476a180e2ae36fe9.tar.gz
recursive_action: add depth param
chmod: match coreutils versus following links
Diffstat (limited to 'findutils/grep.c')
-rw-r--r--findutils/grep.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/findutils/grep.c b/findutils/grep.c
index b76a17a..8bb38f9 100644
--- a/findutils/grep.c
+++ b/findutils/grep.c
@@ -290,7 +290,7 @@ static void load_regexes_from_file(llist_t *fopt)
}
-static int file_action_grep(const char *filename, struct stat *statbuf, void* matched)
+static int file_action_grep(const char *filename, struct stat *statbuf, void* matched, int depth)
{
FILE *file = fopen(filename, "r");
if (file == NULL) {
@@ -315,7 +315,8 @@ static int grep_dir(const char *dir)
/* depthFirst= */ 1,
/* fileAction= */ file_action_grep,
/* dirAction= */ NULL,
- /* userData= */ &matched);
+ /* userData= */ &matched,
+ /* depth= */ 0);
return matched;
}