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/chown.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/chown.c')
-rw-r--r-- | coreutils/chown.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/coreutils/chown.c b/coreutils/chown.c index bef89ce..fddce7c 100644 --- a/coreutils/chown.c +++ b/coreutils/chown.c @@ -32,7 +32,7 @@ static int (*chown_func)(const char *, uid_t, gid_t) = chown; */ static int fileAction(const char *fileName, struct stat *statbuf, - void ATTRIBUTE_UNUSED *junk) + void ATTRIBUTE_UNUSED *junk, int depth) { // TODO: -H/-L/-P // if (depth ... && S_ISLNK(statbuf->st_mode)) .... @@ -75,7 +75,8 @@ int chown_main(int argc, char **argv) *groupName++ = '\0'; gid = get_ug_id(groupName, bb_xgetgrnam); } - if (--groupName != *argv) uid = get_ug_id(*argv, bb_xgetpwnam); + if (--groupName != *argv) + uid = get_ug_id(*argv, bb_xgetpwnam); ++argv; /* Ok, ready to do the deed now */ @@ -86,7 +87,8 @@ int chown_main(int argc, char **argv) FALSE, // depth first fileAction, // file action fileAction, // dir action - NULL) // user data + NULL, // user data + 0) // depth ) { retval = EXIT_FAILURE; } |