mirror of
https://github.com/kdave/btrfs-progs
synced 2025-01-18 11:40:56 +00:00
btrfs-progs: fix short/long unit size options
The two variants of unit options are not suitable for all commands, the short options could interfere with existing options or limit future extensions. In 'filesystem du' the short options are not documented neither in help text, nor in documentation so fix the code In 'scrub status' it's the same but the documentation needs to be fixed as well. Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
022168c32d
commit
5f7191135f
@ -111,13 +111,13 @@ print human friendly numbers, base 1024, this is the default
|
||||
select the 1024 base for the following options, according to the IEC standard
|
||||
--si::::
|
||||
select the 1000 base for the following options, according to the SI standard
|
||||
-k|--kbytes::::
|
||||
--kbytes::::
|
||||
show sizes in KiB, or kB with --si
|
||||
-m|--mbytes::::
|
||||
--mbytes::::
|
||||
show sizes in MiB, or MB with --si
|
||||
-g|--gbytes::::
|
||||
--gbytes::::
|
||||
show sizes in GiB, or GB with --si
|
||||
-t|--tbytes::::
|
||||
--tbytes::::
|
||||
show sizes in TiB, or TB with --si
|
||||
|
||||
EXIT STATUS
|
||||
|
@ -566,7 +566,7 @@ static int cmd_filesystem_du(const struct cmd_struct *cmd,
|
||||
int i;
|
||||
u32 kernel_version;
|
||||
|
||||
unit_mode = get_unit_mode_from_arg(&argc, argv, 1);
|
||||
unit_mode = get_unit_mode_from_arg(&argc, argv, 0);
|
||||
|
||||
optind = 0;
|
||||
while (1) {
|
||||
|
@ -1745,7 +1745,7 @@ static int cmd_scrub_status(const struct cmd_struct *cmd, int argc, char **argv)
|
||||
int err = 0;
|
||||
DIR *dirstream = NULL;
|
||||
|
||||
unit_mode = get_unit_mode_from_arg(&argc, argv, 1);
|
||||
unit_mode = get_unit_mode_from_arg(&argc, argv, 0);
|
||||
|
||||
optind = 0;
|
||||
while ((c = getopt(argc, argv, "dR")) != -1) {
|
||||
|
Loading…
Reference in New Issue
Block a user