diff options
Diffstat (limited to 'util-linux/fdisk.c')
-rw-r--r-- | util-linux/fdisk.c | 12 |
1 files changed, 6 insertions, 6 deletions
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; |