File util-linux-sfdisk-show-pt-geometry-3.patch of Package util-linux.7828
From 349ac672734d15df09096475dbb08250fc165cbc Mon Sep 17 00:00:00 2001
From: Karel Zak <kzak@redhat.com>
Date: Mon, 8 Aug 2016 12:15:47 +0200
Subject: [PATCH 3/3] sfdisk: add show-pt-geometry to usage() and sfdisk.8
Signed-off-by: Karel Zak <kzak@redhat.com>
---
disk-utils/sfdisk.8 | 4 +++-
disk-utils/sfdisk.c | 3 ++-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/disk-utils/sfdisk.8 b/disk-utils/sfdisk.8
index 69dc96c..adbd138 100644
--- a/disk-utils/sfdisk.8
+++ b/disk-utils/sfdisk.8
@@ -79,7 +79,9 @@ Dump the partitions of a device in a format that is usable as input to \fBsfdisk
See the section \fBBACKING UP THE PARTITION TABLE\fR.
.TP
.BR \-g , " \-\-show\-geometry " [ \fIdevice ...]
-List the geometry of all or the specified devices.
+List the geometry of all or the specified devices. For backward
+compatibility the deprecated option \fB\-\-show\-pt\-geometry\fR have the same
+meaning as this one.
.TP
.BR \-J , " \-\-json " \fIdevice\fR
Dump the partitions of a device in JSON format. Note that \fBsfdisk\fR is
diff --git a/disk-utils/sfdisk.c b/disk-utils/sfdisk.c
index 589cca9..6613a4f 100644
--- a/disk-utils/sfdisk.c
+++ b/disk-utils/sfdisk.c
@@ -1820,6 +1820,7 @@ static void __attribute__ ((__noreturn__)) usage(FILE *out)
fputs(_(" -X, --label <name> specify label type (dos, gpt, ...)\n"), out);
fputs(_(" -Y, --label-nested <name> specify nested label type (dos, bsd)\n"), out);
fputs(USAGE_SEPARATOR, out);
+ fputs(_(" -G, --show-pt-geometry deprecated, alias to --show-geometry\n"), out);
fputs(_(" -L, --Linux deprecated, only for backward compatibility\n"), out);
fputs(_(" -u, --unit S deprecated, only sector unit is supported\n"), out);
@@ -1886,7 +1887,6 @@ int main(int argc, char *argv[])
{ "reorder", no_argument, NULL, 'r' },
{ "show-size", no_argument, NULL, 's' },
{ "show-geometry", no_argument, NULL, 'g' },
- { "show-pt-geometry", no_argument, NULL, 'G' },
{ "quiet", no_argument, NULL, 'q' },
{ "verify", no_argument, NULL, 'V' },
{ "version", no_argument, NULL, 'v' },
@@ -1898,6 +1898,7 @@ int main(int argc, char *argv[])
{ "part-type", no_argument, NULL, OPT_PARTTYPE },
{ "part-attrs", no_argument, NULL, OPT_PARTATTRS },
+ { "show-pt-geometry", no_argument, NULL, 'G' }, /* deprecated */
{ "unit", required_argument, NULL, 'u' },
{ "Linux", no_argument, NULL, 'L' }, /* deprecated */
--
2.9.3