aboutsummaryrefslogtreecommitdiff
path: root/coreutils/chown.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2009-04-21 11:09:40 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2009-04-21 11:09:40 +0000
commit5e34ff29bcc870936ab18172f438a34d042d4e03 (patch)
treea5e7a528f2f916eb883f1161eadceacdf2dca4be /coreutils/chown.c
parent8b814b4a349e2262c0ad25793b05206a14651ebb (diff)
downloadbusybox-w32-5e34ff29bcc870936ab18172f438a34d042d4e03.tar.gz
busybox-w32-5e34ff29bcc870936ab18172f438a34d042d4e03.tar.bz2
busybox-w32-5e34ff29bcc870936ab18172f438a34d042d4e03.zip
*: mass renaming of USE_XXXX to IF_XXXX
and SKIP_XXXX to IF_NOT_XXXX - the second one was especially badly named. It was not skipping anything!
Diffstat (limited to 'coreutils/chown.c')
-rw-r--r--coreutils/chown.c14
1 files changed, 7 insertions, 7 deletions
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 @@
16/* This is a NOEXEC applet. Be very careful! */ 16/* This is a NOEXEC applet. Be very careful! */
17 17
18 18
19#define OPT_STR ("Rh" USE_DESKTOP("vcfLHP")) 19#define OPT_STR ("Rh" IF_DESKTOP("vcfLHP"))
20#define BIT_RECURSE 1 20#define BIT_RECURSE 1
21#define OPT_RECURSE (opt & 1) 21#define OPT_RECURSE (opt & 1)
22#define OPT_NODEREF (opt & 2) 22#define OPT_NODEREF (opt & 2)
23#define OPT_VERBOSE (USE_DESKTOP(opt & 0x04) SKIP_DESKTOP(0)) 23#define OPT_VERBOSE (IF_DESKTOP(opt & 0x04) IF_NOT_DESKTOP(0))
24#define OPT_CHANGED (USE_DESKTOP(opt & 0x08) SKIP_DESKTOP(0)) 24#define OPT_CHANGED (IF_DESKTOP(opt & 0x08) IF_NOT_DESKTOP(0))
25#define OPT_QUIET (USE_DESKTOP(opt & 0x10) SKIP_DESKTOP(0)) 25#define OPT_QUIET (IF_DESKTOP(opt & 0x10) IF_NOT_DESKTOP(0))
26/* POSIX options 26/* POSIX options
27 * -L traverse every symbolic link to a directory encountered 27 * -L traverse every symbolic link to a directory encountered
28 * -H if a command line argument is a symbolic link to a directory, traverse it 28 * -H if a command line argument is a symbolic link to a directory, traverse it
@@ -32,10 +32,10 @@
32 * The last option specified shall determine the behavior of the utility." */ 32 * The last option specified shall determine the behavior of the utility." */
33/* -L */ 33/* -L */
34#define BIT_TRAVERSE 0x20 34#define BIT_TRAVERSE 0x20
35#define OPT_TRAVERSE (USE_DESKTOP(opt & BIT_TRAVERSE) SKIP_DESKTOP(0)) 35#define OPT_TRAVERSE (IF_DESKTOP(opt & BIT_TRAVERSE) IF_NOT_DESKTOP(0))
36/* -H or -L */ 36/* -H or -L */
37#define BIT_TRAVERSE_TOP (0x20|0x40) 37#define BIT_TRAVERSE_TOP (0x20|0x40)
38#define OPT_TRAVERSE_TOP (USE_DESKTOP(opt & BIT_TRAVERSE_TOP) SKIP_DESKTOP(0)) 38#define OPT_TRAVERSE_TOP (IF_DESKTOP(opt & BIT_TRAVERSE_TOP) IF_NOT_DESKTOP(0))
39 39
40typedef int (*chown_fptr)(const char *, uid_t, gid_t); 40typedef int (*chown_fptr)(const char *, uid_t, gid_t);
41 41
@@ -85,7 +85,7 @@ int chown_main(int argc UNUSED_PARAM, char **argv)
85 /* This matches coreutils behavior (almost - see below) */ 85 /* This matches coreutils behavior (almost - see below) */
86 if (OPT_NODEREF 86 if (OPT_NODEREF
87 /* || (OPT_RECURSE && !OPT_TRAVERSE_TOP): */ 87 /* || (OPT_RECURSE && !OPT_TRAVERSE_TOP): */
88 USE_DESKTOP( || (opt & (BIT_RECURSE|BIT_TRAVERSE_TOP)) == BIT_RECURSE) 88 IF_DESKTOP( || (opt & (BIT_RECURSE|BIT_TRAVERSE_TOP)) == BIT_RECURSE)
89 ) { 89 ) {
90 param.chown_func = lchown; 90 param.chown_func = lchown;
91 } 91 }