diff options
author | David Sterba <dsterba@suse.com> | 2015-11-02 18:32:04 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2015-11-02 18:39:41 +0100 |
commit | 5205097bacbc64a7590d3139430b456bedf57de2 (patch) | |
tree | c309386ac0a0d2b3cee2847c9f91747ee4b9960d /cmds-fi-usage.c | |
parent | a0c78dca8fc606da1467774ef6f9f33cea6d62ff (diff) |
btrfs-progs: fi usage: cleanup, print header in one go
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'cmds-fi-usage.c')
-rw-r--r-- | cmds-fi-usage.c | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/cmds-fi-usage.c b/cmds-fi-usage.c index a5a4936b..65c16b80 100644 --- a/cmds-fi-usage.c +++ b/cmds-fi-usage.c @@ -643,30 +643,19 @@ static void _cmd_filesystem_usage_tabular(unsigned unit_mode, /* header */ for (i = 0, col = 1; i < sargs->total_spaces; i++) { - const char *description; u64 flags = sargs->spaces[i].flags; if (flags & BTRFS_SPACE_INFO_GLOBAL_RSV) continue; - description = btrfs_group_type_str(flags); - - table_printf(matrix, col++, 0, "<%s", description); + table_printf(matrix, col, 0, "<%s", + btrfs_group_type_str(flags)); + table_printf(matrix, col, 1, "<%s", + btrfs_group_profile_str(flags)); + col++; } unallocated_col = col; - for (i = 0, col = 1; i < sargs->total_spaces; i++) { - const char *r_mode; - u64 flags = sargs->spaces[i].flags; - - if (flags & BTRFS_SPACE_INFO_GLOBAL_RSV) - continue; - - r_mode = btrfs_group_profile_str(flags); - - table_printf(matrix, col++, 1, "<%s", r_mode); - } - table_printf(matrix, unallocated_col, 1, "<Unallocated"); /* body */ |