On Thu, 13 Feb 2014 20:20:12 +0100
Goffredo Baroncelli <kreij...@libero.it> wrote:

> 
> Signed-off-by: Goffredo Baroncelli <kreij...@inwind.it>
> ---
>  cmds-device.c        |   3 ++
>  cmds-fi-disk_usage.c | 136 
> +++++++++++++++++++++++++++++++++++++++++++++++++++
>  cmds-fi-disk_usage.h |   3 ++
>  3 files changed, 142 insertions(+)
> 
> diff --git a/cmds-device.c b/cmds-device.c
> index bc4a8dc..f25dbfa 100644
> --- a/cmds-device.c
> +++ b/cmds-device.c
> @@ -28,6 +28,7 @@
>  #include "ctree.h"
>  #include "ioctl.h"
>  #include "utils.h"
> +#include "cmds-fi-disk_usage.h"
>  
>  #include "commands.h"
>  
> @@ -401,6 +402,8 @@ const struct cmd_group device_cmd_group = {
>               { "scan", cmd_scan_dev, cmd_scan_dev_usage, NULL, 0 },
>               { "ready", cmd_ready_dev, cmd_ready_dev_usage, NULL, 0 },
>               { "stats", cmd_dev_stats, cmd_dev_stats_usage, NULL, 0 },
> +             { "disk-usage", cmd_device_disk_usage,
> +                     cmd_device_disk_usage_usage, NULL, 0 },
>               NULL_CMD_STRUCT

Why not just name it "du"? Think about the current handy feature of shortening
commands by only specifying parts of the keywords. "btrfs dev du" would seem
more intuitive than calling it as "btrfs dev disk" or "btrfs dev disk-u".

Or simply "usage", because "...device disk..." is redundant, device is already
a disk, so it can easily be "btrfs device usage".

-- 
With respect,
Roman

Attachment: signature.asc
Description: PGP signature

Reply via email to