]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-objectstore-tool: Fix output of section type number
authorDavid Zafman <dzafman@redhat.com>
Wed, 6 Dec 2017 02:25:19 +0000 (18:25 -0800)
committerNathan Cutler <ncutler@suse.com>
Wed, 31 Jan 2018 22:38:34 +0000 (23:38 +0100)
Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit 508328784516136fe189581bfbfe5a791db8e9fd)

src/tools/ceph_objectstore_tool.cc

index 4d6318942a9e7e2bee4b1660981b3a29c87ffdc1..814e22875b0bdc9cc76aab18d00e0b6450d9f968 100644 (file)
@@ -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;
     }
   }