summaryrefslogtreecommitdiff
path: root/utils.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.cz>2015-03-23 19:49:51 +0100
committerDavid Sterba <dsterba@suse.cz>2015-04-07 19:25:16 +0200
commit39b3d7c77a551b7c6b2063789797fceeae22b346 (patch)
tree07e532f7d67be372480cea1ede20c5b0342bc54c /utils.c
parent7ea86ad28239cfb444cb13951bc536223c9d3da2 (diff)
btrfs-progs: print fs features filtered by a mask
mkfs and convert will not support the same features, -O will print only the list according to the given mask. Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'utils.c')
-rw-r--r--utils.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/utils.c b/utils.c
index ca8e49a4..b175b011 100644
--- a/utils.c
+++ b/utils.c
@@ -606,14 +606,16 @@ void btrfs_process_fs_features(u64 flags)
}
}
-void btrfs_list_all_fs_features(void)
+void btrfs_list_all_fs_features(u64 mask_disallowed)
{
int i;
- fprintf(stderr, "Filesystem features available at mkfs time:\n");
+ fprintf(stderr, "Filesystem features available:\n");
for (i = 0; i < ARRAY_SIZE(mkfs_features) - 1; i++) {
char *is_default = "";
+ if (mkfs_features[i].flag & mask_disallowed)
+ continue;
if (mkfs_features[i].flag & BTRFS_MKFS_DEFAULT_FEATURES)
is_default = ", default";
fprintf(stderr, "%-20s- %s (0x%llx%s)\n",