From 4b4e391a28b4dfeb69781c20190bffe8622d1907 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 30 Jun 2014 15:10:29 +0200 Subject: [PATCH] fdisk: don't use --geom-* prefix for CHS options We already use --cylinders, --heads and --sectors for sfdisk, let's make new fdisk option compatible. Signed-off-by: Karel Zak --- disk-utils/fdisk.8 | 6 +++--- disk-utils/fdisk.c | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/disk-utils/fdisk.8 b/disk-utils/fdisk.8 index d53d93b302..1da15d9034 100644 --- a/disk-utils/fdisk.8 +++ b/disk-utils/fdisk.8 @@ -90,16 +90,16 @@ Note that the optional \fIunit\fR argument cannot be separated from the \fB-u\fR option by a space, the correct form is for example '-u=cylinders'. .TP -\fB\-C\fR, \fB\-\-geom\-cylinders\fR \fInumber\fR +\fB\-C\fR, \fB\-\-cylinders\fR \fInumber\fR Specify the number of cylinders of the disk. I have no idea why anybody would want to do so. .TP -\fB\-H\fR, \fB\-\-geom\-heads\fR \fInumber\fR +\fB\-H\fR, \fB\-\-heads\fR \fInumber\fR Specify the number of heads of the disk. (Not the physical number, of course, but the number used for partition tables.) Reasonable values are 255 and 16. .TP -\fB\-S\fR, \fB\-\-geom\-sectors\fR \fInumber\fR +\fB\-S\fR, \fB\-\-sectors\fR \fInumber\fR Specify the number of sectors per track of the disk. (Not the physical number, of course, but the number used for partition tables.) A reasonable value is 63. diff --git a/disk-utils/fdisk.c b/disk-utils/fdisk.c index 88072810e3..e9b4fec506 100644 --- a/disk-utils/fdisk.c +++ b/disk-utils/fdisk.c @@ -757,9 +757,9 @@ static void __attribute__ ((__noreturn__)) usage(FILE *out) fputs(_(" -s, --getsz display device size in 512-byte sectors [DEPRECATED]\n"), out); fputs(USAGE_SEPARATOR, out); - fputs(_(" -C, --geom-cylinders specify the number of cylinders\n"), out); - fputs(_(" -H, --geom-heads specify the number of heads\n"), out); - fputs(_(" -S, --geom-sectors specify the number of sectors per track\n"), out); + fputs(_(" -C, --cylinders specify the number of cylinders\n"), out); + fputs(_(" -H, --heads specify the number of heads\n"), out); + fputs(_(" -S, --sectors specify the number of sectors per track\n"), out); fputs(USAGE_SEPARATOR, out); fputs(USAGE_HELP, out); @@ -785,9 +785,9 @@ int main(int argc, char **argv) static const struct option longopts[] = { { "color", optional_argument, NULL, 'L' }, { "compatibility", optional_argument, NULL, 'c' }, - { "geom-cylinders", required_argument, NULL, 'C' }, - { "geom-heads", required_argument, NULL, 'H' }, - { "geom-sectors", required_argument, NULL, 'S' }, + { "cylinders", required_argument, NULL, 'C' }, + { "heads", required_argument, NULL, 'H' }, + { "sectors", required_argument, NULL, 'S' }, { "getsz", no_argument, NULL, 's' }, { "help", no_argument, NULL, 'h' }, { "list", no_argument, NULL, 'l' }, -- 2.47.3