summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarel Zak2013-08-30 13:34:16 +0200
committerKarel Zak2013-09-16 16:47:08 +0200
commit9564e46ce21cd0c6ef99e3df9a52197793288f24 (patch)
treeb76e02446e306c7fec2443f910397921c95fc839
parentfdisk: main() refactoring (diff)
downloadkernel-qcow2-util-linux-9564e46ce21cd0c6ef99e3df9a52197793288f24.tar.gz
kernel-qcow2-util-linux-9564e46ce21cd0c6ef99e3df9a52197793288f24.tar.xz
kernel-qcow2-util-linux-9564e46ce21cd0c6ef99e3df9a52197793288f24.zip
fdisk: mark -s option as deprecated
Signed-off-by: Karel Zak <kzak@redhat.com>
-rw-r--r--Documentation/deprecated.txt5
-rw-r--r--fdisks/fdisk.84
-rw-r--r--fdisks/fdisk.c3
3 files changed, 10 insertions, 2 deletions
diff --git a/Documentation/deprecated.txt b/Documentation/deprecated.txt
index 9a2198014..5113594ac 100644
--- a/Documentation/deprecated.txt
+++ b/Documentation/deprecated.txt
@@ -2,6 +2,11 @@ The following is a list of commands or features that are deprecated. All
deprecated utils are in maintenance mode and we keep them in source tree for
backward compatibility only.
+What: fdisk -s <device>
+Why: this does not belong to fdisk, use "blockdev --getsz"
+
+--------------------------
+
What: 'udev' and 'list' blkid(8) output formats
Why: udevd links libblkid directly; the 'list' is unnecessary, use lsblk(8)
diff --git a/fdisks/fdisk.8 b/fdisks/fdisk.8
index 9e81eb23c..439f0f62f 100644
--- a/fdisks/fdisk.8
+++ b/fdisks/fdisk.8
@@ -225,7 +225,9 @@ If no devices are given, those mentioned in
(if that exists) are used.
.TP
.BI "\-s " partition...
-Print the size (in blocks) of each given partition.
+Print the size (in blocks) of each given partition. This option is DEPRECATED
+in favour of
+.B blockdev (1).
.TP
.BI "\-u"[=unit]
When listing partition tables, show sizes in 'sectors' or in 'cylinders'. The
diff --git a/fdisks/fdisk.c b/fdisks/fdisk.c
index 36d426611..905aaa193 100644
--- a/fdisks/fdisk.c
+++ b/fdisks/fdisk.c
@@ -53,7 +53,7 @@ static void __attribute__ ((__noreturn__)) usage(FILE *out)
fprintf(out,
_(" %1$s [options] <disk> change partition table\n"
" %1$s [options] -l <disk> list partition table(s)\n"
- " %1$s -s <partition> give partition size(s) in blocks\n"),
+ " %1$s -s <partition> give partition size(s) in blocks (deprecated)\n"),
program_invocation_short_name);
fputs(USAGE_OPTIONS, out);
@@ -451,6 +451,7 @@ int main(int argc, char **argv)
break;
case ACT_SHOWSIZE:
+ /* deprecated */
if (argc - optind <= 0)
usage(stderr);