summaryrefslogtreecommitdiff
path: root/cmds-fi-disk_usage.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.cz>2015-01-21 18:47:24 +0100
committerDavid Sterba <dsterba@suse.cz>2015-01-21 18:56:28 +0100
commit58a39524619f38d193b8adc3d57888ec07b612aa (patch)
tree877a5e4487d232197b8cc8bfb043a97ab7ab1633 /cmds-fi-disk_usage.c
parenta5b66a81bf6007b3c3b3b108ffcb4cbd75287d57 (diff)
btrfs-progs: add --human-readable option where applicable
Add an alias to -h to 'filesystem usage', 'filesystem df' and 'device usage' commands, same as the traditional 'df'. Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'cmds-fi-disk_usage.c')
-rw-r--r--cmds-fi-disk_usage.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/cmds-fi-disk_usage.c b/cmds-fi-disk_usage.c
index 5e8e39bc..faf86981 100644
--- a/cmds-fi-disk_usage.c
+++ b/cmds-fi-disk_usage.c
@@ -849,7 +849,8 @@ const char * const cmd_filesystem_usage_usage[] = {
"btrfs filesystem usage [options] <path> [<path>..]",
"Show detailed information about internal filesystem usage .",
"-b|--raw raw numbers in bytes",
- "-h human friendly numbers, base 1024 (default)",
+ "-h|--human-readable",
+ " human friendly numbers, base 1024 (default)",
"-H human friendly numbers, base 1000",
"--iec use 1024 as a base (KiB, MiB, GiB, TiB)",
"--si use 1000 as a base (kB, MB, GB, TB)",
@@ -879,6 +880,8 @@ int cmd_filesystem_usage(int argc, char **argv)
{ "tbytes", no_argument, NULL, 't'},
{ "si", no_argument, NULL, GETOPT_VAL_SI},
{ "iec", no_argument, NULL, GETOPT_VAL_IEC},
+ { "human-readable", no_argument, NULL,
+ GETOPT_VAL_HUMAN_READABLE},
};
int c = getopt_long(argc, argv, "bhHkmgtT", long_options,
&long_index);
@@ -901,6 +904,7 @@ int cmd_filesystem_usage(int argc, char **argv)
case 't':
units_set_base(&unit_mode, UNITS_TBYTES);
break;
+ case GETOPT_VAL_HUMAN_READABLE:
case 'h':
unit_mode = UNITS_HUMAN_BINARY;
break;