X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=coreutils%2Fchown.c;h=2d8e556f06029f2ed5f7e2e117db952d8b290a32;hb=eab40e58858d01372b5d74b7330be2d7b1c7fc75;hp=34524926150db0fd3bef86fda8a0a5ca54198186;hpb=08d120e6e1242498b8e5ca92870a362bb1c64c85;p=oweals%2Fbusybox.git diff --git a/coreutils/chown.c b/coreutils/chown.c index 345249261..2d8e556f0 100644 --- a/coreutils/chown.c +++ b/coreutils/chown.c @@ -16,13 +16,13 @@ /* This is a NOEXEC applet. Be very careful! */ -#define OPT_STR ("Rh" USE_DESKTOP("vcfLHP")) +#define OPT_STR ("Rh" IF_DESKTOP("vcfLHP")) #define BIT_RECURSE 1 #define OPT_RECURSE (opt & 1) #define OPT_NODEREF (opt & 2) -#define OPT_VERBOSE (USE_DESKTOP(opt & 0x04) SKIP_DESKTOP(0)) -#define OPT_CHANGED (USE_DESKTOP(opt & 0x08) SKIP_DESKTOP(0)) -#define OPT_QUIET (USE_DESKTOP(opt & 0x10) SKIP_DESKTOP(0)) +#define OPT_VERBOSE (IF_DESKTOP(opt & 0x04) IF_NOT_DESKTOP(0)) +#define OPT_CHANGED (IF_DESKTOP(opt & 0x08) IF_NOT_DESKTOP(0)) +#define OPT_QUIET (IF_DESKTOP(opt & 0x10) IF_NOT_DESKTOP(0)) /* POSIX options * -L traverse every symbolic link to a directory encountered * -H if a command line argument is a symbolic link to a directory, traverse it @@ -32,10 +32,10 @@ * The last option specified shall determine the behavior of the utility." */ /* -L */ #define BIT_TRAVERSE 0x20 -#define OPT_TRAVERSE (USE_DESKTOP(opt & BIT_TRAVERSE) SKIP_DESKTOP(0)) +#define OPT_TRAVERSE (IF_DESKTOP(opt & BIT_TRAVERSE) IF_NOT_DESKTOP(0)) /* -H or -L */ #define BIT_TRAVERSE_TOP (0x20|0x40) -#define OPT_TRAVERSE_TOP (USE_DESKTOP(opt & BIT_TRAVERSE_TOP) SKIP_DESKTOP(0)) +#define OPT_TRAVERSE_TOP (IF_DESKTOP(opt & BIT_TRAVERSE_TOP) IF_NOT_DESKTOP(0)) typedef int (*chown_fptr)(const char *, uid_t, gid_t); @@ -85,7 +85,7 @@ int chown_main(int argc UNUSED_PARAM, char **argv) /* This matches coreutils behavior (almost - see below) */ if (OPT_NODEREF /* || (OPT_RECURSE && !OPT_TRAVERSE_TOP): */ - USE_DESKTOP( || (opt & (BIT_RECURSE|BIT_TRAVERSE_TOP)) == BIT_RECURSE) + IF_DESKTOP( || (opt & (BIT_RECURSE|BIT_TRAVERSE_TOP)) == BIT_RECURSE) ) { param.chown_func = lchown; }