mirror of
https://github.com/sheumann/hush.git
synced 2024-12-22 14:30:31 +00:00
chown: -2 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
31416d589e
commit
9882b34fe2
@ -89,7 +89,6 @@ int chown_main(int argc UNUSED_PARAM, char **argv)
|
|||||||
|
|
||||||
param.ugid.uid = -1;
|
param.ugid.uid = -1;
|
||||||
param.ugid.gid = -1;
|
param.ugid.gid = -1;
|
||||||
param.chown_func = chown;
|
|
||||||
|
|
||||||
#if ENABLE_FEATURE_CHOWN_LONG_OPTIONS
|
#if ENABLE_FEATURE_CHOWN_LONG_OPTIONS
|
||||||
applet_long_options = chown_longopts;
|
applet_long_options = chown_longopts;
|
||||||
@ -99,6 +98,7 @@ int chown_main(int argc UNUSED_PARAM, char **argv)
|
|||||||
argv += optind;
|
argv += optind;
|
||||||
|
|
||||||
/* This matches coreutils behavior (almost - see below) */
|
/* This matches coreutils behavior (almost - see below) */
|
||||||
|
param.chown_func = chown;
|
||||||
if (OPT_NODEREF
|
if (OPT_NODEREF
|
||||||
/* || (OPT_RECURSE && !OPT_TRAVERSE_TOP): */
|
/* || (OPT_RECURSE && !OPT_TRAVERSE_TOP): */
|
||||||
IF_DESKTOP( || (opt & (BIT_RECURSE|BIT_TRAVERSE_TOP)) == BIT_RECURSE)
|
IF_DESKTOP( || (opt & (BIT_RECURSE|BIT_TRAVERSE_TOP)) == BIT_RECURSE)
|
||||||
@ -117,8 +117,7 @@ int chown_main(int argc UNUSED_PARAM, char **argv)
|
|||||||
parse_chown_usergroup_or_die(¶m.ugid, argv[0]);
|
parse_chown_usergroup_or_die(¶m.ugid, argv[0]);
|
||||||
|
|
||||||
/* Ok, ready to do the deed now */
|
/* Ok, ready to do the deed now */
|
||||||
argv++;
|
while (*++argv) {
|
||||||
do {
|
|
||||||
if (!recursive_action(*argv,
|
if (!recursive_action(*argv,
|
||||||
flags, /* flags */
|
flags, /* flags */
|
||||||
fileAction, /* file action */
|
fileAction, /* file action */
|
||||||
@ -128,7 +127,7 @@ int chown_main(int argc UNUSED_PARAM, char **argv)
|
|||||||
) {
|
) {
|
||||||
retval = EXIT_FAILURE;
|
retval = EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
} while (*++argv);
|
}
|
||||||
|
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user