summaryrefslogtreecommitdiff
path: root/util-linux
diff options
context:
space:
mode:
authorDenis Vlasenko2009-04-21 11:09:40 +0000
committerDenis Vlasenko2009-04-21 11:09:40 +0000
commit5e34ff29bcc870936ab18172f438a34d042d4e03 (patch)
treea5e7a528f2f916eb883f1161eadceacdf2dca4be /util-linux
parent8b814b4a349e2262c0ad25793b05206a14651ebb (diff)
downloadbusybox-5e34ff29bcc870936ab18172f438a34d042d4e03.zip
busybox-5e34ff29bcc870936ab18172f438a34d042d4e03.tar.gz
*: 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 'util-linux')
-rw-r--r--util-linux/acpid.c4
-rw-r--r--util-linux/fdisk.c12
-rw-r--r--util-linux/fsck_minix.c2
-rw-r--r--util-linux/hexdump.c2
-rw-r--r--util-linux/mount.c28
5 files changed, 24 insertions, 24 deletions
diff --git a/util-linux/acpid.c b/util-linux/acpid.c
index 49ea52d..7dd4f5b 100644
--- a/util-linux/acpid.c
+++ b/util-linux/acpid.c
@@ -61,9 +61,9 @@ int acpid_main(int argc, char **argv)
const char *opt_logfile = "/var/log/acpid.log";
getopt32(argv, "c:e:l:d"
- USE_FEATURE_ACPID_COMPAT("g:m:s:S:v"),
+ IF_FEATURE_ACPID_COMPAT("g:m:s:S:v"),
&opt_conf, &opt_input, &opt_logfile
- USE_FEATURE_ACPID_COMPAT(, NULL, NULL, NULL, NULL, NULL)
+ IF_FEATURE_ACPID_COMPAT(, NULL, NULL, NULL, NULL, NULL)
);
// daemonize unless -d given
diff --git a/util-linux/fdisk.c b/util-linux/fdisk.c
index dc61e23..514b5d7 100644
--- a/util-linux/fdisk.c
+++ b/util-linux/fdisk.c
@@ -17,7 +17,7 @@
/* Looks like someone forgot to add this to config system */
#ifndef ENABLE_FEATURE_FDISK_BLKSIZE
# define ENABLE_FEATURE_FDISK_BLKSIZE 0
-# define USE_FEATURE_FDISK_BLKSIZE(a)
+# define IF_FEATURE_FDISK_BLKSIZE(a)
#endif
#define DEFAULT_SECTOR_SIZE 512
@@ -1302,7 +1302,7 @@ static int get_boot(void)
// or get_boot() [table is bad] -> create_sunlabel() -> get_boot(CREATE_EMPTY_SUN).
// (just factor out re-init of ptes[0,1,2,3] in a separate fn instead?)
// So skip opening device _again_...
- if (what == CREATE_EMPTY_DOS USE_FEATURE_SUN_LABEL(|| what == CREATE_EMPTY_SUN))
+ if (what == CREATE_EMPTY_DOS IF_FEATURE_SUN_LABEL(|| what == CREATE_EMPTY_SUN))
goto created_table;
fd = open(disk_device, (option_mask32 & OPT_l) ? O_RDONLY : O_RDWR);
@@ -1372,7 +1372,7 @@ static int get_boot(void)
"partition table, nor Sun, SGI or OSF "
"disklabel\n");
#ifdef __sparc__
- USE_FEATURE_SUN_LABEL(create_sunlabel();)
+ IF_FEATURE_SUN_LABEL(create_sunlabel();)
#else
create_doslabel();
#endif
@@ -1385,7 +1385,7 @@ static int get_boot(void)
#endif /* FEATURE_FDISK_WRITABLE */
- USE_FEATURE_FDISK_WRITABLE(warn_cylinders();)
+ IF_FEATURE_FDISK_WRITABLE(warn_cylinders();)
warn_geometry();
for (i = 0; i < 4; i++) {
@@ -1406,7 +1406,7 @@ static int get_boot(void)
pe->sectorbuffer[510],
pe->sectorbuffer[511],
i + 1);
- USE_FEATURE_FDISK_WRITABLE(pe->changed = 1;)
+ IF_FEATURE_FDISK_WRITABLE(pe->changed = 1;)
}
}
@@ -2797,7 +2797,7 @@ int fdisk_main(int argc, char **argv)
close_dev_fd(); /* needed: fd 3 must not stay closed */
opt_complementary = "b+:C+:H+:S+"; /* numeric params */
- opt = getopt32(argv, "b:C:H:lS:u" USE_FEATURE_FDISK_BLKSIZE("s"),
+ opt = getopt32(argv, "b:C:H:lS:u" IF_FEATURE_FDISK_BLKSIZE("s"),
&sector_size, &user_cylinders, &user_heads, &user_sectors);
argc -= optind;
argv += optind;
diff --git a/util-linux/fsck_minix.c b/util-linux/fsck_minix.c
index 78a7c82..0c33c1b 100644
--- a/util-linux/fsck_minix.c
+++ b/util-linux/fsck_minix.c
@@ -151,7 +151,7 @@ struct globals {
char superblock_buffer[BLOCK_SIZE];
char add_zone_ind_blk[BLOCK_SIZE];
char add_zone_dind_blk[BLOCK_SIZE];
- USE_FEATURE_MINIX2(char add_zone_tind_blk[BLOCK_SIZE];)
+ IF_FEATURE_MINIX2(char add_zone_tind_blk[BLOCK_SIZE];)
char check_file_blk[BLOCK_SIZE];
/* File-name data */
diff --git a/util-linux/hexdump.c b/util-linux/hexdump.c
index 48edd70..98d1ac2 100644
--- a/util-linux/hexdump.c
+++ b/util-linux/hexdump.c
@@ -41,7 +41,7 @@ static const char *const add_strings[] = {
static const char add_first[] ALIGN1 = "\"%07.7_Ax\n\"";
-static const char hexdump_opts[] ALIGN1 = "bcdoxCe:f:n:s:v" USE_FEATURE_HEXDUMP_REVERSE("R");
+static const char hexdump_opts[] ALIGN1 = "bcdoxCe:f:n:s:v" IF_FEATURE_HEXDUMP_REVERSE("R");
static const struct suffix_mult suffixes[] = {
{ "b", 512 },
diff --git a/util-linux/mount.c b/util-linux/mount.c
index 694057b..d954feb 100644
--- a/util-linux/mount.c
+++ b/util-linux/mount.c
@@ -105,22 +105,22 @@ enum {
static const int32_t mount_options[] = {
// MS_FLAGS set a bit. ~MS_FLAGS disable that bit. 0 flags are NOPs.
- USE_FEATURE_MOUNT_LOOP(
+ IF_FEATURE_MOUNT_LOOP(
/* "loop" */ 0,
)
- USE_FEATURE_MOUNT_FSTAB(
+ IF_FEATURE_MOUNT_FSTAB(
/* "defaults" */ 0,
/* "quiet" 0 - do not filter out, vfat wants to see it */
/* "noauto" */ MOUNT_NOAUTO,
/* "sw" */ MOUNT_SWAP,
/* "swap" */ MOUNT_SWAP,
- USE_DESKTOP(/* "user" */ MOUNT_USERS,)
- USE_DESKTOP(/* "users" */ MOUNT_USERS,)
+ IF_DESKTOP(/* "user" */ MOUNT_USERS,)
+ IF_DESKTOP(/* "users" */ MOUNT_USERS,)
/* "_netdev" */ 0,
)
- USE_FEATURE_MOUNT_FLAGS(
+ IF_FEATURE_MOUNT_FLAGS(
// vfs flags
/* "nosuid" */ MS_NOSUID,
/* "suid" */ ~MS_NOSUID,
@@ -161,20 +161,20 @@ static const int32_t mount_options[] = {
};
static const char mount_option_str[] =
- USE_FEATURE_MOUNT_LOOP(
+ IF_FEATURE_MOUNT_LOOP(
"loop\0"
)
- USE_FEATURE_MOUNT_FSTAB(
+ IF_FEATURE_MOUNT_FSTAB(
"defaults\0"
// "quiet\0" - do not filter out, vfat wants to see it
"noauto\0"
"sw\0"
"swap\0"
- USE_DESKTOP("user\0")
- USE_DESKTOP("users\0")
+ IF_DESKTOP("user\0")
+ IF_DESKTOP("users\0")
"_netdev\0"
)
- USE_FEATURE_MOUNT_FLAGS(
+ IF_FEATURE_MOUNT_FLAGS(
// vfs flags
"nosuid\0"
"suid\0"
@@ -1781,9 +1781,9 @@ int mount_main(int argc UNUSED_PARAM, char **argv)
int i, j, rc = 0;
unsigned opt;
struct mntent mtpair[2], *mtcur = mtpair;
- SKIP_DESKTOP(const int nonroot = 0;)
+ IF_NOT_DESKTOP(const int nonroot = 0;)
- USE_DESKTOP(int nonroot = ) sanitize_env_if_suid();
+ IF_DESKTOP(int nonroot = ) sanitize_env_if_suid();
// Parse long options, like --bind and --move. Note that -o option
// and --option are synonymous. Yes, this means --remount,rw works.
@@ -1797,9 +1797,9 @@ int mount_main(int argc UNUSED_PARAM, char **argv)
// Parse remaining options
// Max 2 params; -o is a list, -v is a counter
- opt_complementary = "?2o::" USE_FEATURE_MOUNT_VERBOSE("vv");
+ opt_complementary = "?2o::" IF_FEATURE_MOUNT_VERBOSE("vv");
opt = getopt32(argv, OPTION_STR, &lst_o, &fstype, &O_optmatch
- USE_FEATURE_MOUNT_VERBOSE(, &verbose));
+ IF_FEATURE_MOUNT_VERBOSE(, &verbose));
while (lst_o) append_mount_options(&cmdopts, llist_pop(&lst_o)); // -o
if (opt & OPT_r) append_mount_options(&cmdopts, "ro"); // -r
if (opt & OPT_w) append_mount_options(&cmdopts, "rw"); // -w