]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
fdisk: disable DOS mode and cylinders by default
authorKarel Zak <kzak@redhat.com>
Tue, 15 Jun 2010 11:13:05 +0000 (13:13 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 15 Jun 2010 11:13:05 +0000 (13:13 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
docs/v2.18-ReleaseNotes
fdisk/fdisk.8
fdisk/fdisk.c

index 4a7f9202ab5a732b21717b90f04861ce03468824..c208b3032caa2ef1f53cedd739ad2f8da99b2acb 100644 (file)
@@ -4,6 +4,10 @@ Util-linux-ng 2.18 Release Notes
 The util-linux-ng package does not contain rdev(8), ramsize(8), 
 vidmode(8) and rootflags(8) anymore. 
 
+The fdisk(8) command does not use DOS-compatible mode and cylinders as
+display units by default. The old deprecated DOS behavior could be enabled
+by 'c' and 'u' fdisk commands.
+
 Release highlights
 ------------------
 
index 30dc9678ad534d2612d6408819baf081da195284..bd94a020dd2b3e8877968fa80a2cdfe4877c5dc2 100644 (file)
@@ -190,7 +190,7 @@ between logical and physical sector size. This option changes both sector sizes
 Print help and then exit.
 .TP
 .BI \-c
-Switch off DOS-compatible mode. (Recommended)
+Switch off DOS-compatible mode. (Default)
 .TP
 .BI "\-C " cyls
 Specify the number of cylinders of the disk.
@@ -215,7 +215,7 @@ If no devices are given, those mentioned in
 .TP
 .B \-u
 When listing partition tables, give sizes in sectors instead
-of cylinders.
+of cylinders. (Default)
 .TP
 .BI "\-s " partition
 The
index 26bc19e1ac0f9b7878d94b5df2f7644c9f0b8ab3..f1392e7b63eb5b00d10c28f2c5e7749f8d589baf 100644 (file)
@@ -204,7 +204,7 @@ int fd,                             /* the disk */
        ext_index,                      /* the prime extended partition */
        listing = 0,                    /* no aborts for fdisk -l */
        nowarn = 0,                     /* no warnings for fdisk -l/-s */
-       dos_compatible_flag = ~0,
+       dos_compatible_flag = 0,        /* disabled by default */
        dos_changed = 0,
        partitions = 4;                 /* maximum partition + 1 */
 
@@ -220,7 +220,7 @@ unsigned int        heads,
        sector_factor = 1,
        user_set_sector_size = 0,
        units_per_sector = 1,
-       display_in_cyl_units = 1;
+       display_in_cyl_units = 0;
 
 unsigned long long total_number_of_sectors;    /* (!) 512-byte sectors */
 unsigned long grain = DEFAULT_SECTOR_SIZE,
@@ -259,14 +259,14 @@ void fatal(enum failure why) {
 " fdisk [options] -l <disk> list partition table(s)\n"
 " fdisk -s <partition>      give partition size(s) in blocks\n"
 "\nOptions:\n"
-" -b <size>                 sector size (512, 1024, 2048 or 4096)\n"
-" -c                        switch off DOS-compatible mode\n"
-" -h                        print this help text\n"
-" -u                        show sizes in sectors instead of cylinders\n"
-" -v                        print program version\n"
-" -C <number>               specify the number of cylinders\n"
-" -H <number>               specify the number of heads\n"
-" -S <number>               specify the number of sectors per track\n"
+" -b <size>             sector size (512, 1024, 2048 or 4096)\n"
+" -c                    switch off DOS-compatible mode (default)\n"
+" -h                    print this help text\n"
+" -u                    show sizes in sectors instead of cylinders (default)\n"
+" -v                    print program version\n"
+" -C <number>           specify the number of cylinders\n"
+" -H <number>           specify the number of heads\n"
+" -S <number>           specify the number of sectors per track\n"
 "\n");
                        break;
                case unable_to_open:
@@ -764,7 +764,7 @@ void update_units(void)
        if (display_in_cyl_units && cyl_units)
                units_per_sector = cyl_units;
        else
-               units_per_sector = 1;   /* in sectors */
+               units_per_sector = 1;   /* in sectors */
 }
 
 static void