Skip to content

Commit

Permalink
os/bluestore/bluestore_tool: do not use boost:filesystem as alternative
Browse files Browse the repository at this point in the history
reverts 9dedabd

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 <[email protected]>
  • Loading branch information
tchaikov committed Jun 9, 2021
1 parent d2b0382 commit bfd911d
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions src/os/bluestore/bluestore_tool.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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)
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit bfd911d

Please sign in to comment.