diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2010-01-23 00:13:32 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-01-23 00:13:32 +0100 |
commit | 9882b34fe22ad55d554fd4451387e472fcc69e8b (patch) | |
tree | a704f17a673ab8db5e8bd0112e5aefa2805c3cf2 /coreutils | |
parent | 31416d589ebb34eeab1af151dd50015105e3db98 (diff) | |
download | busybox-w32-9882b34fe22ad55d554fd4451387e472fcc69e8b.tar.gz busybox-w32-9882b34fe22ad55d554fd4451387e472fcc69e8b.tar.bz2 busybox-w32-9882b34fe22ad55d554fd4451387e472fcc69e8b.zip |
chown: -2 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'coreutils')
-rw-r--r-- | coreutils/chown.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/coreutils/chown.c b/coreutils/chown.c index d29f8252a..c6c1260ad 100644 --- a/coreutils/chown.c +++ b/coreutils/chown.c | |||
@@ -89,7 +89,6 @@ int chown_main(int argc UNUSED_PARAM, char **argv) | |||
89 | 89 | ||
90 | param.ugid.uid = -1; | 90 | param.ugid.uid = -1; |
91 | param.ugid.gid = -1; | 91 | param.ugid.gid = -1; |
92 | param.chown_func = chown; | ||
93 | 92 | ||
94 | #if ENABLE_FEATURE_CHOWN_LONG_OPTIONS | 93 | #if ENABLE_FEATURE_CHOWN_LONG_OPTIONS |
95 | applet_long_options = chown_longopts; | 94 | applet_long_options = chown_longopts; |
@@ -99,6 +98,7 @@ int chown_main(int argc UNUSED_PARAM, char **argv) | |||
99 | argv += optind; | 98 | argv += optind; |
100 | 99 | ||
101 | /* This matches coreutils behavior (almost - see below) */ | 100 | /* This matches coreutils behavior (almost - see below) */ |
101 | param.chown_func = chown; | ||
102 | if (OPT_NODEREF | 102 | if (OPT_NODEREF |
103 | /* || (OPT_RECURSE && !OPT_TRAVERSE_TOP): */ | 103 | /* || (OPT_RECURSE && !OPT_TRAVERSE_TOP): */ |
104 | IF_DESKTOP( || (opt & (BIT_RECURSE|BIT_TRAVERSE_TOP)) == BIT_RECURSE) | 104 | IF_DESKTOP( || (opt & (BIT_RECURSE|BIT_TRAVERSE_TOP)) == BIT_RECURSE) |
@@ -117,8 +117,7 @@ int chown_main(int argc UNUSED_PARAM, char **argv) | |||
117 | parse_chown_usergroup_or_die(¶m.ugid, argv[0]); | 117 | parse_chown_usergroup_or_die(¶m.ugid, argv[0]); |
118 | 118 | ||
119 | /* Ok, ready to do the deed now */ | 119 | /* Ok, ready to do the deed now */ |
120 | argv++; | 120 | while (*++argv) { |
121 | do { | ||
122 | if (!recursive_action(*argv, | 121 | if (!recursive_action(*argv, |
123 | flags, /* flags */ | 122 | flags, /* flags */ |
124 | fileAction, /* file action */ | 123 | fileAction, /* file action */ |
@@ -128,7 +127,7 @@ int chown_main(int argc UNUSED_PARAM, char **argv) | |||
128 | ) { | 127 | ) { |
129 | retval = EXIT_FAILURE; | 128 | retval = EXIT_FAILURE; |
130 | } | 129 | } |
131 | } while (*++argv); | 130 | } |
132 | 131 | ||
133 | return retval; | 132 | return retval; |
134 | } | 133 | } |