diff options
author | Karel Zak | 2010-02-15 14:39:30 +0100 |
---|---|---|
committer | Karel Zak | 2010-02-15 14:43:49 +0100 |
commit | 78498b7b90cfae7d45912a3c3f80cfca57df95ec (patch) | |
tree | 84045d647ec73b0c19407440ea49605b8539535b /fdisk/fdisk.c | |
parent | fdisk: fix ALIGN_UP (diff) | |
download | kernel-qcow2-util-linux-78498b7b90cfae7d45912a3c3f80cfca57df95ec.tar.gz kernel-qcow2-util-linux-78498b7b90cfae7d45912a3c3f80cfca57df95ec.tar.xz kernel-qcow2-util-linux-78498b7b90cfae7d45912a3c3f80cfca57df95ec.zip |
fdisk: add -c option (switch off DOS mode)
* add -c to allows to switch off DOS mode from command line
* recommend sectors (command 'u' or option -u)
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'fdisk/fdisk.c')
-rw-r--r-- | fdisk/fdisk.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/fdisk/fdisk.c b/fdisk/fdisk.c index 55caa0c2d..b752d9b98 100644 --- a/fdisk/fdisk.c +++ b/fdisk/fdisk.c @@ -259,6 +259,7 @@ void fatal(enum failure why) { " 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 help\n" " -u <size> give sizes in sectors instead of cylinders\n" " -v print version\n" @@ -794,7 +795,12 @@ warn_alignment(void) { " sectors (command 'u').\n")); else fprintf(stderr, ".\n"); - } + + } else if (display_in_cyl_units) + fprintf(stderr, _("\n" +"WARNING: cylinders as display units are deprecated. Use command 'u' to\n" +" change units to sectors.\n")); + } static void @@ -2857,7 +2863,7 @@ main(int argc, char **argv) { bindtextdomain(PACKAGE, LOCALEDIR); textdomain(PACKAGE); - while ((c = getopt(argc, argv, "b:C:hH:lsS:uvV")) != -1) { + while ((c = getopt(argc, argv, "b:cC:hH:lsS:uvV")) != -1) { switch (c) { case 'b': /* Ugly: this sector size is really per device, @@ -2874,6 +2880,9 @@ main(int argc, char **argv) { case 'C': user_cylinders = atoi(optarg); break; + case 'c': + dos_compatible_flag = 0; + break; case 'h': fatal(help); break; |