]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore/bluestore_tool: do not use boost:filesystem as alternative
authorKefu Chai <kchai@redhat.com>
Mon, 7 Jun 2021 08:21:22 +0000 (16:21 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 9 Jun 2021 15:25:22 +0000 (23:25 +0800)
reverts 9dedabde520907f99727edf9f916ebb55ccdaa87

since there is no need to be compatible with GCC older than GCC-8, so
there is no need to use boost::filesystem as an alternative of
std::filesystem anymore.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/os/bluestore/bluestore_tool.cc

index 804183882871ae813578811f4f303bcf35a70e0b..7a2df40b87d9ef1b8425a07aaabe578272c08f2d 100644 (file)
@@ -6,15 +6,7 @@
 
 #include <stdio.h>
 #include <string.h>
-#if __has_include(<filesystem>)
 #include <filesystem>
-namespace fs = std::filesystem;
-using sys_error_code = std::error_code;
-#else
-#include <boost/filesystem.hpp>
-namespace fs = boost::filesystem;
-using sys_error_code = boost::system::error_code;
-#endif
 #include <iostream>
 #include <fstream>
 #include <time.h>
@@ -31,6 +23,7 @@ using sys_error_code = boost::system::error_code;
 #include "common/admin_socket.h"
 #include "kv/RocksDBStore.h"
 
+namespace fs = std::filesystem;
 namespace po = boost::program_options;
 
 void usage(po::options_description &desc)
@@ -787,7 +780,7 @@ int main(int argc, char **argv)
       if (dev_target.empty()) {
        return {"", false};
       }
-      sys_error_code ec;
+      std::error_code ec;
       fs::path target_path = fs::weakly_canonical(fs::path{dev_target}, ec);
       if (ec) {
        cerr << "failed to retrieve absolute path for " << dev_target