From: David Zafman Date: Wed, 6 Dec 2017 02:25:19 +0000 (-0800) Subject: ceph-objectstore-tool: Fix output of section type number X-Git-Tag: v12.2.3~36^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=99d740322e231b3c1ddc8a8c6517baca71c14a01;p=ceph.git ceph-objectstore-tool: Fix output of section type number Signed-off-by: David Zafman (cherry picked from commit 508328784516136fe189581bfbfe5a791db8e9fd) --- diff --git a/src/tools/ceph_objectstore_tool.cc b/src/tools/ceph_objectstore_tool.cc index 4d6318942a9..814e22875b0 100644 --- a/src/tools/ceph_objectstore_tool.cc +++ b/src/tools/ceph_objectstore_tool.cc @@ -1213,7 +1213,7 @@ int ObjectStoreTool::do_import(ObjectStore *store, OSDSuperblock& sb, cerr << "Pool exports cannot be imported into a PG" << std::endl; return -EINVAL; } else if (type != TYPE_PG_BEGIN) { - cerr << "Invalid first section type " << type << std::endl; + cerr << "Invalid first section type " << std::to_string(type) << std::endl; return -EFAULT; } @@ -1328,7 +1328,9 @@ int ObjectStoreTool::do_import(ObjectStore *store, OSDSuperblock& sb, if (ret) return ret; - //cout << "do_import: Section type " << hex << type << dec << std::endl; + if (debug) { + cout << __func__ << ": Section type " << std::to_string(type) << std::endl; + } if (type >= END_OF_TYPES) { cout << "Skipping unknown section type" << std::endl; continue; @@ -1347,7 +1349,7 @@ int ObjectStoreTool::do_import(ObjectStore *store, OSDSuperblock& sb, done = true; break; default: - cerr << "Unknown section type " << type << std::endl; + cerr << "Unknown section type " << std::to_string(type) << std::endl; return -EFAULT; } }