From: Sage Weil Date: Mon, 22 Apr 2013 19:38:11 +0000 (-0700) Subject: rbd: fix feature display for --info X-Git-Tag: v0.61~126^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5446218f7bda980dfcb73c853cb5af799bd14fdd;p=ceph.git rbd: fix feature display for --info Only include the feature if it is set! Backport: bobtail Signed-off-by: Sage Weil --- diff --git a/src/rbd.cc b/src/rbd.cc index 397852252844..84b5d191b0cc 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; }