diff options
Diffstat (limited to 'util-linux')
-rw-r--r-- | util-linux/acpid.c | 4 | ||||
-rw-r--r-- | util-linux/fdisk.c | 12 | ||||
-rw-r--r-- | util-linux/fsck_minix.c | 2 | ||||
-rw-r--r-- | util-linux/hexdump.c | 2 | ||||
-rw-r--r-- | util-linux/mount.c | 28 |
5 files changed, 24 insertions, 24 deletions
diff --git a/util-linux/acpid.c b/util-linux/acpid.c index 49ea52d53..7dd4f5b15 100644 --- a/util-linux/acpid.c +++ b/util-linux/acpid.c | |||
@@ -61,9 +61,9 @@ int acpid_main(int argc, char **argv) | |||
61 | const char *opt_logfile = "/var/log/acpid.log"; | 61 | const char *opt_logfile = "/var/log/acpid.log"; |
62 | 62 | ||
63 | getopt32(argv, "c:e:l:d" | 63 | getopt32(argv, "c:e:l:d" |
64 | USE_FEATURE_ACPID_COMPAT("g:m:s:S:v"), | 64 | IF_FEATURE_ACPID_COMPAT("g:m:s:S:v"), |
65 | &opt_conf, &opt_input, &opt_logfile | 65 | &opt_conf, &opt_input, &opt_logfile |
66 | USE_FEATURE_ACPID_COMPAT(, NULL, NULL, NULL, NULL, NULL) | 66 | IF_FEATURE_ACPID_COMPAT(, NULL, NULL, NULL, NULL, NULL) |
67 | ); | 67 | ); |
68 | 68 | ||
69 | // daemonize unless -d given | 69 | // daemonize unless -d given |
diff --git a/util-linux/fdisk.c b/util-linux/fdisk.c index dc61e238a..514b5d79c 100644 --- a/util-linux/fdisk.c +++ b/util-linux/fdisk.c | |||
@@ -17,7 +17,7 @@ | |||
17 | /* Looks like someone forgot to add this to config system */ | 17 | /* Looks like someone forgot to add this to config system */ |
18 | #ifndef ENABLE_FEATURE_FDISK_BLKSIZE | 18 | #ifndef ENABLE_FEATURE_FDISK_BLKSIZE |
19 | # define ENABLE_FEATURE_FDISK_BLKSIZE 0 | 19 | # define ENABLE_FEATURE_FDISK_BLKSIZE 0 |
20 | # define USE_FEATURE_FDISK_BLKSIZE(a) | 20 | # define IF_FEATURE_FDISK_BLKSIZE(a) |
21 | #endif | 21 | #endif |
22 | 22 | ||
23 | #define DEFAULT_SECTOR_SIZE 512 | 23 | #define DEFAULT_SECTOR_SIZE 512 |
@@ -1302,7 +1302,7 @@ static int get_boot(void) | |||
1302 | // or get_boot() [table is bad] -> create_sunlabel() -> get_boot(CREATE_EMPTY_SUN). | 1302 | // or get_boot() [table is bad] -> create_sunlabel() -> get_boot(CREATE_EMPTY_SUN). |
1303 | // (just factor out re-init of ptes[0,1,2,3] in a separate fn instead?) | 1303 | // (just factor out re-init of ptes[0,1,2,3] in a separate fn instead?) |
1304 | // So skip opening device _again_... | 1304 | // So skip opening device _again_... |
1305 | if (what == CREATE_EMPTY_DOS USE_FEATURE_SUN_LABEL(|| what == CREATE_EMPTY_SUN)) | 1305 | if (what == CREATE_EMPTY_DOS IF_FEATURE_SUN_LABEL(|| what == CREATE_EMPTY_SUN)) |
1306 | goto created_table; | 1306 | goto created_table; |
1307 | 1307 | ||
1308 | fd = open(disk_device, (option_mask32 & OPT_l) ? O_RDONLY : O_RDWR); | 1308 | fd = open(disk_device, (option_mask32 & OPT_l) ? O_RDONLY : O_RDWR); |
@@ -1372,7 +1372,7 @@ static int get_boot(void) | |||
1372 | "partition table, nor Sun, SGI or OSF " | 1372 | "partition table, nor Sun, SGI or OSF " |
1373 | "disklabel\n"); | 1373 | "disklabel\n"); |
1374 | #ifdef __sparc__ | 1374 | #ifdef __sparc__ |
1375 | USE_FEATURE_SUN_LABEL(create_sunlabel();) | 1375 | IF_FEATURE_SUN_LABEL(create_sunlabel();) |
1376 | #else | 1376 | #else |
1377 | create_doslabel(); | 1377 | create_doslabel(); |
1378 | #endif | 1378 | #endif |
@@ -1385,7 +1385,7 @@ static int get_boot(void) | |||
1385 | #endif /* FEATURE_FDISK_WRITABLE */ | 1385 | #endif /* FEATURE_FDISK_WRITABLE */ |
1386 | 1386 | ||
1387 | 1387 | ||
1388 | USE_FEATURE_FDISK_WRITABLE(warn_cylinders();) | 1388 | IF_FEATURE_FDISK_WRITABLE(warn_cylinders();) |
1389 | warn_geometry(); | 1389 | warn_geometry(); |
1390 | 1390 | ||
1391 | for (i = 0; i < 4; i++) { | 1391 | for (i = 0; i < 4; i++) { |
@@ -1406,7 +1406,7 @@ static int get_boot(void) | |||
1406 | pe->sectorbuffer[510], | 1406 | pe->sectorbuffer[510], |
1407 | pe->sectorbuffer[511], | 1407 | pe->sectorbuffer[511], |
1408 | i + 1); | 1408 | i + 1); |
1409 | USE_FEATURE_FDISK_WRITABLE(pe->changed = 1;) | 1409 | IF_FEATURE_FDISK_WRITABLE(pe->changed = 1;) |
1410 | } | 1410 | } |
1411 | } | 1411 | } |
1412 | 1412 | ||
@@ -2797,7 +2797,7 @@ int fdisk_main(int argc, char **argv) | |||
2797 | close_dev_fd(); /* needed: fd 3 must not stay closed */ | 2797 | close_dev_fd(); /* needed: fd 3 must not stay closed */ |
2798 | 2798 | ||
2799 | opt_complementary = "b+:C+:H+:S+"; /* numeric params */ | 2799 | opt_complementary = "b+:C+:H+:S+"; /* numeric params */ |
2800 | opt = getopt32(argv, "b:C:H:lS:u" USE_FEATURE_FDISK_BLKSIZE("s"), | 2800 | opt = getopt32(argv, "b:C:H:lS:u" IF_FEATURE_FDISK_BLKSIZE("s"), |
2801 | §or_size, &user_cylinders, &user_heads, &user_sectors); | 2801 | §or_size, &user_cylinders, &user_heads, &user_sectors); |
2802 | argc -= optind; | 2802 | argc -= optind; |
2803 | argv += optind; | 2803 | argv += optind; |
diff --git a/util-linux/fsck_minix.c b/util-linux/fsck_minix.c index 78a7c826b..0c33c1b02 100644 --- a/util-linux/fsck_minix.c +++ b/util-linux/fsck_minix.c | |||
@@ -151,7 +151,7 @@ struct globals { | |||
151 | char superblock_buffer[BLOCK_SIZE]; | 151 | char superblock_buffer[BLOCK_SIZE]; |
152 | char add_zone_ind_blk[BLOCK_SIZE]; | 152 | char add_zone_ind_blk[BLOCK_SIZE]; |
153 | char add_zone_dind_blk[BLOCK_SIZE]; | 153 | char add_zone_dind_blk[BLOCK_SIZE]; |
154 | USE_FEATURE_MINIX2(char add_zone_tind_blk[BLOCK_SIZE];) | 154 | IF_FEATURE_MINIX2(char add_zone_tind_blk[BLOCK_SIZE];) |
155 | char check_file_blk[BLOCK_SIZE]; | 155 | char check_file_blk[BLOCK_SIZE]; |
156 | 156 | ||
157 | /* File-name data */ | 157 | /* File-name data */ |
diff --git a/util-linux/hexdump.c b/util-linux/hexdump.c index 48edd70a9..98d1ac2ba 100644 --- a/util-linux/hexdump.c +++ b/util-linux/hexdump.c | |||
@@ -41,7 +41,7 @@ static const char *const add_strings[] = { | |||
41 | 41 | ||
42 | static const char add_first[] ALIGN1 = "\"%07.7_Ax\n\""; | 42 | static const char add_first[] ALIGN1 = "\"%07.7_Ax\n\""; |
43 | 43 | ||
44 | static const char hexdump_opts[] ALIGN1 = "bcdoxCe:f:n:s:v" USE_FEATURE_HEXDUMP_REVERSE("R"); | 44 | static const char hexdump_opts[] ALIGN1 = "bcdoxCe:f:n:s:v" IF_FEATURE_HEXDUMP_REVERSE("R"); |
45 | 45 | ||
46 | static const struct suffix_mult suffixes[] = { | 46 | static const struct suffix_mult suffixes[] = { |
47 | { "b", 512 }, | 47 | { "b", 512 }, |
diff --git a/util-linux/mount.c b/util-linux/mount.c index 694057bbe..d954febe5 100644 --- a/util-linux/mount.c +++ b/util-linux/mount.c | |||
@@ -105,22 +105,22 @@ enum { | |||
105 | static const int32_t mount_options[] = { | 105 | static const int32_t mount_options[] = { |
106 | // MS_FLAGS set a bit. ~MS_FLAGS disable that bit. 0 flags are NOPs. | 106 | // MS_FLAGS set a bit. ~MS_FLAGS disable that bit. 0 flags are NOPs. |
107 | 107 | ||
108 | USE_FEATURE_MOUNT_LOOP( | 108 | IF_FEATURE_MOUNT_LOOP( |
109 | /* "loop" */ 0, | 109 | /* "loop" */ 0, |
110 | ) | 110 | ) |
111 | 111 | ||
112 | USE_FEATURE_MOUNT_FSTAB( | 112 | IF_FEATURE_MOUNT_FSTAB( |
113 | /* "defaults" */ 0, | 113 | /* "defaults" */ 0, |
114 | /* "quiet" 0 - do not filter out, vfat wants to see it */ | 114 | /* "quiet" 0 - do not filter out, vfat wants to see it */ |
115 | /* "noauto" */ MOUNT_NOAUTO, | 115 | /* "noauto" */ MOUNT_NOAUTO, |
116 | /* "sw" */ MOUNT_SWAP, | 116 | /* "sw" */ MOUNT_SWAP, |
117 | /* "swap" */ MOUNT_SWAP, | 117 | /* "swap" */ MOUNT_SWAP, |
118 | USE_DESKTOP(/* "user" */ MOUNT_USERS,) | 118 | IF_DESKTOP(/* "user" */ MOUNT_USERS,) |
119 | USE_DESKTOP(/* "users" */ MOUNT_USERS,) | 119 | IF_DESKTOP(/* "users" */ MOUNT_USERS,) |
120 | /* "_netdev" */ 0, | 120 | /* "_netdev" */ 0, |
121 | ) | 121 | ) |
122 | 122 | ||
123 | USE_FEATURE_MOUNT_FLAGS( | 123 | IF_FEATURE_MOUNT_FLAGS( |
124 | // vfs flags | 124 | // vfs flags |
125 | /* "nosuid" */ MS_NOSUID, | 125 | /* "nosuid" */ MS_NOSUID, |
126 | /* "suid" */ ~MS_NOSUID, | 126 | /* "suid" */ ~MS_NOSUID, |
@@ -161,20 +161,20 @@ static const int32_t mount_options[] = { | |||
161 | }; | 161 | }; |
162 | 162 | ||
163 | static const char mount_option_str[] = | 163 | static const char mount_option_str[] = |
164 | USE_FEATURE_MOUNT_LOOP( | 164 | IF_FEATURE_MOUNT_LOOP( |
165 | "loop\0" | 165 | "loop\0" |
166 | ) | 166 | ) |
167 | USE_FEATURE_MOUNT_FSTAB( | 167 | IF_FEATURE_MOUNT_FSTAB( |
168 | "defaults\0" | 168 | "defaults\0" |
169 | // "quiet\0" - do not filter out, vfat wants to see it | 169 | // "quiet\0" - do not filter out, vfat wants to see it |
170 | "noauto\0" | 170 | "noauto\0" |
171 | "sw\0" | 171 | "sw\0" |
172 | "swap\0" | 172 | "swap\0" |
173 | USE_DESKTOP("user\0") | 173 | IF_DESKTOP("user\0") |
174 | USE_DESKTOP("users\0") | 174 | IF_DESKTOP("users\0") |
175 | "_netdev\0" | 175 | "_netdev\0" |
176 | ) | 176 | ) |
177 | USE_FEATURE_MOUNT_FLAGS( | 177 | IF_FEATURE_MOUNT_FLAGS( |
178 | // vfs flags | 178 | // vfs flags |
179 | "nosuid\0" | 179 | "nosuid\0" |
180 | "suid\0" | 180 | "suid\0" |
@@ -1781,9 +1781,9 @@ int mount_main(int argc UNUSED_PARAM, char **argv) | |||
1781 | int i, j, rc = 0; | 1781 | int i, j, rc = 0; |
1782 | unsigned opt; | 1782 | unsigned opt; |
1783 | struct mntent mtpair[2], *mtcur = mtpair; | 1783 | struct mntent mtpair[2], *mtcur = mtpair; |
1784 | SKIP_DESKTOP(const int nonroot = 0;) | 1784 | IF_NOT_DESKTOP(const int nonroot = 0;) |
1785 | 1785 | ||
1786 | USE_DESKTOP(int nonroot = ) sanitize_env_if_suid(); | 1786 | IF_DESKTOP(int nonroot = ) sanitize_env_if_suid(); |
1787 | 1787 | ||
1788 | // Parse long options, like --bind and --move. Note that -o option | 1788 | // Parse long options, like --bind and --move. Note that -o option |
1789 | // and --option are synonymous. Yes, this means --remount,rw works. | 1789 | // and --option are synonymous. Yes, this means --remount,rw works. |
@@ -1797,9 +1797,9 @@ int mount_main(int argc UNUSED_PARAM, char **argv) | |||
1797 | 1797 | ||
1798 | // Parse remaining options | 1798 | // Parse remaining options |
1799 | // Max 2 params; -o is a list, -v is a counter | 1799 | // Max 2 params; -o is a list, -v is a counter |
1800 | opt_complementary = "?2o::" USE_FEATURE_MOUNT_VERBOSE("vv"); | 1800 | opt_complementary = "?2o::" IF_FEATURE_MOUNT_VERBOSE("vv"); |
1801 | opt = getopt32(argv, OPTION_STR, &lst_o, &fstype, &O_optmatch | 1801 | opt = getopt32(argv, OPTION_STR, &lst_o, &fstype, &O_optmatch |
1802 | USE_FEATURE_MOUNT_VERBOSE(, &verbose)); | 1802 | IF_FEATURE_MOUNT_VERBOSE(, &verbose)); |
1803 | while (lst_o) append_mount_options(&cmdopts, llist_pop(&lst_o)); // -o | 1803 | while (lst_o) append_mount_options(&cmdopts, llist_pop(&lst_o)); // -o |
1804 | if (opt & OPT_r) append_mount_options(&cmdopts, "ro"); // -r | 1804 | if (opt & OPT_r) append_mount_options(&cmdopts, "ro"); // -r |
1805 | if (opt & OPT_w) append_mount_options(&cmdopts, "rw"); // -w | 1805 | if (opt & OPT_w) append_mount_options(&cmdopts, "rw"); // -w |