From 8c35d65c43216bb840326ac7476a180e2ae36fe9 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Fri, 27 Oct 2006 23:42:25 +0000 Subject: recursive_action: add depth param chmod: match coreutils versus following links --- findutils/grep.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'findutils/grep.c') 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) } -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; } -- cgit v1.2.3