From bfd911d88a45378134d4c5c7586e64b8d7ce6643 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Mon, 7 Jun 2021 16:21:22 +0800 Subject: [PATCH] os/bluestore/bluestore_tool: do not use boost:filesystem as alternative 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 --- src/os/bluestore/bluestore_tool.cc | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/os/bluestore/bluestore_tool.cc b/src/os/bluestore/bluestore_tool.cc index 804183882871a..7a2df40b87d9e 100644 --- a/src/os/bluestore/bluestore_tool.cc +++ b/src/os/bluestore/bluestore_tool.cc @@ -6,15 +6,7 @@ #include #include -#if __has_include() #include -namespace fs = std::filesystem; -using sys_error_code = std::error_code; -#else -#include -namespace fs = boost::filesystem; -using sys_error_code = boost::system::error_code; -#endif #include #include #include @@ -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 -- 2.39.5