]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
hobject_t: pad hash to 8 digits
authorSage Weil <sage@redhat.com>
Tue, 14 Jul 2015 19:06:41 +0000 (15:06 -0400)
committerSage Weil <sage@redhat.com>
Fri, 7 Aug 2015 14:16:01 +0000 (10:16 -0400)
Signed-off-by: Sage Weil <sage@redhat.com>
src/common/hobject.cc

index d241ee99fccf5195a034394bd0b7642a082f3e46..8fbaf7a722f62f5a8cb53abef04675cb1bca67e8 100644 (file)
@@ -201,7 +201,13 @@ ostream& operator<<(ostream& out, const hobject_t& o)
   if (o.is_max())
     return out << "MAX";
   out << o.pool << '/';
-  out << std::hex << o.get_hash() << std::dec;
+  out << std::hex;
+  out.width(8);
+  out.fill('0');
+  out << o.get_hash();
+  out.width(0);
+  out.fill(' ');
+  out << std::dec;
   if (o.nspace.length())
     out << ":" << o.nspace;
   if (o.get_key().length())