From e50d2a7be6209ab951e52e259990f7cae8551d46 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 14 Jul 2015 15:06:41 -0400 Subject: [PATCH] hobject_t: pad hash to 8 digits Signed-off-by: Sage Weil --- src/common/hobject.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/common/hobject.cc b/src/common/hobject.cc index d241ee99fcc..8fbaf7a722f 100644 --- a/src/common/hobject.cc +++ b/src/common/hobject.cc @@ -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()) -- 2.47.3