aboutsummaryrefslogtreecommitdiff
path: root/coreutils/diff.c
diff options
context:
space:
mode:
authorvda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-10-27 23:42:25 +0000
committervda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-10-27 23:42:25 +0000
commit155a25478340968f01da4c24c144600f910c323f (patch)
tree13d20b31e817dcff5124498ca0bec2cdf9781014 /coreutils/diff.c
parent491278531cfa3089ca16ce8a832accfd9771f1e9 (diff)
downloadbusybox-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 'coreutils/diff.c')
-rw-r--r--coreutils/diff.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/coreutils/diff.c b/coreutils/diff.c
index 2915d4009..f26bcca86 100644
--- a/coreutils/diff.c
+++ b/coreutils/diff.c
@@ -1030,7 +1030,7 @@ static int dir_strcmp(const void *p1, const void *p2)
1030/* This function adds a filename to dl, the directory listing. */ 1030/* This function adds a filename to dl, the directory listing. */
1031 1031
1032static int add_to_dirlist(const char *filename, 1032static int add_to_dirlist(const char *filename,
1033 struct stat ATTRIBUTE_UNUSED * sb, void *userdata) 1033 struct stat ATTRIBUTE_UNUSED * sb, void *userdata, int depth)
1034{ 1034{
1035 dl_count++; 1035 dl_count++;
1036 dl = xrealloc(dl, dl_count * sizeof(char *)); 1036 dl = xrealloc(dl, dl_count * sizeof(char *));
@@ -1067,7 +1067,7 @@ static char **get_dir(char *path)
1067 /* Now fill dl with a listing. */ 1067 /* Now fill dl with a listing. */
1068 if (cmd_flags & FLAG_r) 1068 if (cmd_flags & FLAG_r)
1069 recursive_action(path, TRUE, TRUE, FALSE, add_to_dirlist, NULL, 1069 recursive_action(path, TRUE, TRUE, FALSE, add_to_dirlist, NULL,
1070 userdata); 1070 userdata, 0);
1071 else { 1071 else {
1072 DIR *dp; 1072 DIR *dp;
1073 struct dirent *ep; 1073 struct dirent *ep;
@@ -1076,7 +1076,7 @@ static char **get_dir(char *path)
1076 while ((ep = readdir(dp))) { 1076 while ((ep = readdir(dp))) {
1077 if ((!strcmp(ep->d_name, "..")) || (!strcmp(ep->d_name, "."))) 1077 if ((!strcmp(ep->d_name, "..")) || (!strcmp(ep->d_name, ".")))
1078 continue; 1078 continue;
1079 add_to_dirlist(ep->d_name, NULL, NULL); 1079 add_to_dirlist(ep->d_name, NULL, NULL, 0);
1080 } 1080 }
1081 closedir(dp); 1081 closedir(dp);
1082 } 1082 }