recursive_action: add depth param

chmod: match coreutils versus following links
This commit is contained in:
Denis Vlasenko
2006-10-27 23:42:25 +00:00
parent e80e2a3660
commit 8c35d65c43
9 changed files with 125 additions and 60 deletions

View File

@@ -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;
}