summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2013-04-22 12:38:11 -0700
committerSage Weil <sage@inktank.com>2013-04-22 12:38:11 -0700
commit5446218f7bda980dfcb73c853cb5af799bd14fdd (patch)
treee8924d4026f663fb04c6d1d8068923265598b543
parent568101fa72e29ee960fcf3d704f04edfd50bd072 (diff)
downloadceph-5446218f7bda980dfcb73c853cb5af799bd14fdd.tar.gz
rbd: fix feature display for --info
Only include the feature if it is set! Backport: bobtail Signed-off-by: Sage Weil <sage@inktank.com>
-rw-r--r--src/rbd.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/rbd.cc b/src/rbd.cc
index 39785225284..84b5d191b0c 100644
--- a/src/rbd.cc
+++ b/src/rbd.cc
@@ -177,9 +177,11 @@ static string features_str(uint64_t features)
for (uint64_t feature = 1; feature <= RBD_FEATURE_STRIPINGV2;
feature <<= 1) {
- if (s.size())
- s += ", ";
- s += feature_str(feature);
+ if (feature & features) {
+ if (s.size())
+ s += ", ";
+ s += feature_str(feature);
+ }
}
return s;
}