diff options
author | Denis Vlasenko | 2006-10-27 23:42:25 +0000 |
---|---|---|
committer | Denis Vlasenko | 2006-10-27 23:42:25 +0000 |
commit | 8c35d65c43216bb840326ac7476a180e2ae36fe9 (patch) | |
tree | 13d20b31e817dcff5124498ca0bec2cdf9781014 /coreutils/diff.c | |
parent | e80e2a3660bf09cc549cb2dfd2bdeb77ccde1231 (diff) | |
download | busybox-8c35d65c43216bb840326ac7476a180e2ae36fe9.zip busybox-8c35d65c43216bb840326ac7476a180e2ae36fe9.tar.gz |
recursive_action: add depth param
chmod: match coreutils versus following links
Diffstat (limited to 'coreutils/diff.c')
-rw-r--r-- | coreutils/diff.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/coreutils/diff.c b/coreutils/diff.c index 2915d40..f26bcca 100644 --- a/coreutils/diff.c +++ b/coreutils/diff.c @@ -1030,7 +1030,7 @@ static int dir_strcmp(const void *p1, const void *p2) /* This function adds a filename to dl, the directory listing. */ static int add_to_dirlist(const char *filename, - struct stat ATTRIBUTE_UNUSED * sb, void *userdata) + struct stat ATTRIBUTE_UNUSED * sb, void *userdata, int depth) { dl_count++; dl = xrealloc(dl, dl_count * sizeof(char *)); @@ -1067,7 +1067,7 @@ static char **get_dir(char *path) /* Now fill dl with a listing. */ if (cmd_flags & FLAG_r) recursive_action(path, TRUE, TRUE, FALSE, add_to_dirlist, NULL, - userdata); + userdata, 0); else { DIR *dp; struct dirent *ep; @@ -1076,7 +1076,7 @@ static char **get_dir(char *path) while ((ep = readdir(dp))) { if ((!strcmp(ep->d_name, "..")) || (!strcmp(ep->d_name, "."))) continue; - add_to_dirlist(ep->d_name, NULL, NULL); + add_to_dirlist(ep->d_name, NULL, NULL, 0); } closedir(dp); } |