From: David Sterba Date: Mon, 2 Nov 2015 17:32:04 +0000 (+0100) Subject: btrfs-progs: fi usage: cleanup, print header in one go X-Git-Tag: upstream/4.16.1~1905 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5205097bacbc64a7590d3139430b456bedf57de2;p=platform%2Fupstream%2Fbtrfs-progs.git btrfs-progs: fi usage: cleanup, print header in one go Signed-off-by: David Sterba --- diff --git a/cmds-fi-usage.c b/cmds-fi-usage.c index a5a4936..65c16b8 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, "