summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Zafman <dzafman@redhat.com>2017-12-06 03:25:19 +0100
committerDavid Zafman <dzafman@redhat.com>2017-12-06 04:40:33 +0100
commit508328784516136fe189581bfbfe5a791db8e9fd (patch)
treec2e9696940c33565cddfb812659632dcc53c5d4b
parentceph-objectstore-tool: Improve ceph-objectstore-tool usage output (diff)
downloadceph-508328784516136fe189581bfbfe5a791db8e9fd.tar.xz
ceph-508328784516136fe189581bfbfe5a791db8e9fd.zip
ceph-objectstore-tool: Fix output of section type number
Signed-off-by: David Zafman <dzafman@redhat.com>
-rw-r--r--src/tools/ceph_objectstore_tool.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/tools/ceph_objectstore_tool.cc b/src/tools/ceph_objectstore_tool.cc
index a7ec4053910..a11a3727124 100644
--- a/src/tools/ceph_objectstore_tool.cc
+++ b/src/tools/ceph_objectstore_tool.cc
@@ -1290,7 +1290,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;
}
@@ -1403,7 +1403,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;
@@ -1422,7 +1424,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;
}
}