diff options
author | Richard W.M. Jones | 2013-10-08 10:54:10 +0200 |
---|---|---|
committer | Karel Zak | 2013-10-08 15:48:00 +0200 |
commit | b1555acc2f709ac4f3b1e6c686a11cadb7b04f72 (patch) | |
tree | 1c12f289edbea1f89822456628cae1c5244327c4 /bash-completion | |
parent | various: fix mixing declarations and code compiler warnings [smatch] (diff) | |
download | kernel-qcow2-util-linux-b1555acc2f709ac4f3b1e6c686a11cadb7b04f72.tar.gz kernel-qcow2-util-linux-b1555acc2f709ac4f3b1e6c686a11cadb7b04f72.tar.xz kernel-qcow2-util-linux-b1555acc2f709ac4f3b1e6c686a11cadb7b04f72.zip |
blockdev: Remove the --setbsz (set blocksize) option which has never worked.
This option has never worked. If you try setting the block size on a
block device, and then read it using --getbsz, you will see that the
block size never changes.
The reason for this is because the block size is specific to the
current file descriptor opening the block device, so the change of
block size only persists for as long as blockdev has the device open,
and is lost once blockdev exits.
Also the block size is not really used anywhere. Filesystems, for
example, have their own idea of block size and ignore this setting
completely.
(Thanks Masayoshi Mizuma for diagnosing the problem)
Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
Diffstat (limited to 'bash-completion')
-rw-r--r-- | bash-completion/blockdev | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/bash-completion/blockdev b/bash-completion/blockdev index ce986cb45..588995562 100644 --- a/bash-completion/blockdev +++ b/bash-completion/blockdev @@ -19,7 +19,6 @@ _blockdev_module() --getalignoff --getmaxsect --getbsz - --setbsz --getsize64 --setra --getra @@ -29,11 +28,7 @@ _blockdev_module() --rereadpt $DEVS" case $prev in - '--setbsz') - COMPREPLY=( $(compgen -W "bytes" -- $cur) ) - return 0 - ;; - '--setbsz'|'--setfra') + '--setfra') COMPREPLY=( $(compgen -W "sectors" -- $cur) ) return 0 ;; |