*: 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!
This commit is contained in:
Denis Vlasenko
2009-04-21 11:09:40 +00:00
parent 8b814b4a34
commit 5e34ff29bc
102 changed files with 1312 additions and 1308 deletions

View File

@@ -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;