summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Venture <venture@google.com>2019-03-08 13:42:10 -0800
committerPatrick Venture <venture@google.com>2019-03-11 07:18:22 -0700
commit9e997b4da98725401769ef82fe26e11c46a059d9 (patch)
tree2491fb824cf7dd7dc31eb066d573200d0d1261e4
parent5d8f570bdc264d7447ee2fc0fb6f134c1a3780f8 (diff)
downloadphosphor-hwmon-9e997b4da98725401769ef82fe26e11c46a059d9.tar.gz
phosphor-hwmon-9e997b4da98725401769ef82fe26e11c46a059d9.zip
use filesystem instead of experimental
Use filesystem now that it should be available instead of experimental::filesystem. Change-Id: I62838b343ce34f85a47661f1eaaff3c7e6338bbf Signed-off-by: Patrick Venture <venture@google.com>
-rw-r--r--configure.ac9
-rw-r--r--fan_pwm.cpp2
-rw-r--r--sensor.cpp4
-rw-r--r--sensorset.cpp4
-rw-r--r--sysfs.cpp4
-rw-r--r--targets.hpp4
6 files changed, 9 insertions, 18 deletions
diff --git a/configure.ac b/configure.ac
index 6278681..0a23f28 100644
--- a/configure.ac
+++ b/configure.ac
@@ -24,15 +24,6 @@ AX_PTHREAD([], [AC_MSG_ERROR(["pthread required and not found"])])
AX_CXX_COMPILE_STDCXX_17([noext])
AX_APPEND_COMPILE_FLAGS([-fpic -Wall -Werror], [CXXFLAGS])
-# Checks for header files.
-AC_CHECK_HEADER(
- experimental/filesystem,
- [],
- [AC_MSG_ERROR(
- [Could not find experimental/filesystem...libstdc++fs development package required])
- ]
-)
-
# Checks for library functions.
LT_INIT
diff --git a/fan_pwm.cpp b/fan_pwm.cpp
index 23eb6dc..f0910c6 100644
--- a/fan_pwm.cpp
+++ b/fan_pwm.cpp
@@ -6,7 +6,7 @@
#include "sensorset.hpp"
#include "sysfs.hpp"
-#include <experimental/filesystem>
+#include <filesystem>
#include <phosphor-logging/elog-errors.hpp>
#include <string>
#include <xyz/openbmc_project/Control/Device/error.hpp>
diff --git a/sensor.cpp b/sensor.cpp
index 28f1479..d45f23a 100644
--- a/sensor.cpp
+++ b/sensor.cpp
@@ -10,7 +10,7 @@
#include <cmath>
#include <cstring>
-#include <experimental/filesystem>
+#include <filesystem>
#include <phosphor-logging/elog-errors.hpp>
#include <thread>
#include <xyz/openbmc_project/Common/error.hpp>
@@ -189,7 +189,7 @@ std::shared_ptr<ValueObject> Sensor::addValue(const RetryIO& retryIO,
std::shared_ptr<StatusObject> Sensor::addStatus(ObjectInfo& info)
{
- namespace fs = std::experimental::filesystem;
+ namespace fs = std::filesystem;
std::shared_ptr<StatusObject> iface = nullptr;
auto& objPath = std::get<std::string>(info);
diff --git a/sensorset.cpp b/sensorset.cpp
index f326e88..e3f4e9c 100644
--- a/sensorset.cpp
+++ b/sensorset.cpp
@@ -17,7 +17,7 @@
#include "hwmon.hpp"
-#include <experimental/filesystem>
+#include <filesystem>
#include <iostream>
#include <regex>
@@ -29,7 +29,7 @@ static const auto sensor_regex_match_count = 4;
SensorSet::SensorSet(const std::string& path)
{
- namespace fs = std::experimental::filesystem;
+ namespace fs = std::filesystem;
for (const auto& file : fs::directory_iterator(path))
{
diff --git a/sysfs.cpp b/sysfs.cpp
index ba07c15..e554afe 100644
--- a/sysfs.cpp
+++ b/sysfs.cpp
@@ -20,14 +20,14 @@
#include <algorithm>
#include <cerrno>
#include <cstdlib>
-#include <experimental/filesystem>
+#include <filesystem>
#include <fstream>
#include <memory>
#include <phosphor-logging/log.hpp>
#include <thread>
using namespace std::string_literals;
-namespace fs = std::experimental::filesystem;
+namespace fs = std::filesystem;
namespace sysfs
{
diff --git a/targets.hpp b/targets.hpp
index 9e63351..540338c 100644
--- a/targets.hpp
+++ b/targets.hpp
@@ -5,7 +5,7 @@
#include "fan_speed.hpp"
#include "hwmonio.hpp"
-#include <experimental/filesystem>
+#include <filesystem>
#include <memory>
#include <phosphor-logging/elog-errors.hpp>
#include <phosphor-logging/log.hpp>
@@ -68,7 +68,7 @@ std::shared_ptr<T> addTarget(const SensorSet::key_type& sensor,
const std::string& devPath, ObjectInfo& info)
{
std::shared_ptr<T> target;
- namespace fs = std::experimental::filesystem;
+ namespace fs = std::filesystem;
auto& obj = std::get<Object>(info);
auto& objPath = std::get<std::string>(info);
OpenPOWER on IntegriCloud