From 42e02d34113534c2e98dfd321fa79671fa7e1d20 Mon Sep 17 00:00:00 2001 From: Andrew Jeffery Date: Thu, 24 May 2018 13:34:05 +0930 Subject: sysfs: Integrate class into Physical and tests Change-Id: I7d5ad19df5ef1258a4e669ea3243b7411f371d9c Signed-off-by: Andrew Jeffery --- controller.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'controller.cpp') diff --git a/controller.cpp b/controller.cpp index 02120e2..82430a7 100644 --- a/controller.cpp +++ b/controller.cpp @@ -18,6 +18,7 @@ #include "argument.hpp" #include "physical.hpp" +#include "sysfs.hpp" #include #include @@ -33,6 +34,8 @@ static void ExitWithError(const char* err, char** argv) int main(int argc, char** argv) { + namespace fs = std::experimental::filesystem; + // Read arguments. auto options = phosphor::led::ArgumentParser(argc, argv); @@ -81,7 +84,8 @@ int main(int argc, char** argv) // Create the Physical LED objects for directing actions. // Need to save this else sdbusplus destructor will wipe this off. - phosphor::led::Physical led(bus, objPath, path); + phosphor::led::SysfsLed sled{fs::path(path)}; + phosphor::led::Physical led(bus, objPath, sled); /** @brief Claim the bus */ bus.request_name(busName.c_str()); -- cgit v1.2.1