btrfs-progs: mkfs: drop numeric flag from -O and -R option list

The raw number of the features in the list of 'mkfs.btrfs -O list-all'
and for -R is not that useful, it's an implementation detail or can be
put to documentation.

Now looks like:

Filesystem features available:
mixed-bg            - mixed data and metadata block groups (compat=2.6.37, safe=2.6.37)
extref              - increased hardlink limit per file to 65536 (compat=3.7, safe=3.12, default=3.12)
raid56              - raid56 extended format (compat=3.9)
...

Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba 2022-09-10 21:18:01 +02:00
parent 1822b12564
commit 4d96291de4

View File

@ -303,17 +303,21 @@ static void list_all_features(u64 mask_disallowed, enum feature_source source)
fprintf(stderr, "%s features available:\n", prefix);
for (i = 0; i < array_size - 1; i++) {
const struct btrfs_feature *feat = get_feature(i, source);
const char *sep = "";
if (feat->flag & mask_disallowed)
continue;
fprintf(stderr, "%-20s- %s (0x%llx", feat->name, feat->desc,
feat->flag);
if (feat->compat_ver)
fprintf(stderr, ", compat=%s", feat->compat_str);
if (feat->safe_ver)
fprintf(stderr, ", safe=%s", feat->safe_str);
fprintf(stderr, "%-20s- %s (", feat->name, feat->desc);
if (feat->compat_ver) {
fprintf(stderr, "compat=%s", feat->compat_str);
sep = ", ";
}
if (feat->safe_ver) {
fprintf(stderr, "%ssafe=%s", sep, feat->safe_str);
sep = ", ";
}
if (feat->default_ver)
fprintf(stderr, ", default=%s", feat->default_str);
fprintf(stderr, "%sdefault=%s", sep, feat->default_str);
fprintf(stderr, ")\n");
}
}