From 4d96291de4ec9c5464b45ec7cd14be36590583a4 Mon Sep 17 00:00:00 2001 From: David Sterba Date: Sat, 10 Sep 2022 21:18:01 +0200 Subject: [PATCH] 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 --- common/fsfeatures.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/common/fsfeatures.c b/common/fsfeatures.c index 90704959..c8118965 100644 --- a/common/fsfeatures.c +++ b/common/fsfeatures.c @@ -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"); } }