diff mbox series

[3/5] Add check for multiple profile in btrfs fi us

Message ID 20200404103212.40986-4-kreijack@libero.it (mailing list archive)
State New, archived
Headers show
Series [1/5] btrfs-progs: Add code for checking mixed profile function | expand

Commit Message

Goffredo Baroncelli April 4, 2020, 10:32 a.m. UTC
From: Goffredo Baroncelli <kreijack@inwind.it>

A new line in the "Overall" section is added to inform that a 
'Multiple profile' is present.

Signed-off-by: Goffredo Baroncelli <kreijack@inwind.it>
---
 cmds/filesystem-usage.c | 5 +++++
 1 file changed, 5 insertions(+)
diff mbox series

Patch

diff --git a/cmds/filesystem-usage.c b/cmds/filesystem-usage.c
index aa7065d5..742b4ea4 100644
--- a/cmds/filesystem-usage.c
+++ b/cmds/filesystem-usage.c
@@ -492,6 +492,11 @@  static int print_filesystem_usage_overall(int fd, struct chunk_info *chunkinfo,
 	printf("    Global reserve:\t\t%*s\t(used: %s)\n", width,
 		pretty_size_mode(l_global_reserve, unit_mode),
 		pretty_size_mode(l_global_reserve_used, unit_mode));
+	if (btrfs_test_for_mixed_profiles_by_fd(fd) > 0)
+		printf("    Multiple profile:\t\t%*s\n", width, "YES");
+	else
+		printf("    Multiple profile:\t\t%*s\n", width, "no");
+
 
 exit: