summaryrefslogtreecommitdiffstats
path: root/controller.cpp
diff options
context:
space:
mode:
authorAndrew Jeffery <andrew@aj.id.au>2018-05-24 13:34:05 +0930
committerAndrew Jeffery <andrew@aj.id.au>2019-04-08 13:48:02 +0930
commit42e02d34113534c2e98dfd321fa79671fa7e1d20 (patch)
tree8b21eb3c30f92a56599bb2d49474f57da49587d6 /controller.cpp
parente185efb810f0befb26276c776d71ed8e56059a1a (diff)
downloadphosphor-led-sysfs-42e02d34113534c2e98dfd321fa79671fa7e1d20.tar.gz
phosphor-led-sysfs-42e02d34113534c2e98dfd321fa79671fa7e1d20.zip
sysfs: Integrate class into Physical and tests
Change-Id: I7d5ad19df5ef1258a4e669ea3243b7411f371d9c Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Diffstat (limited to 'controller.cpp')
-rw-r--r--controller.cpp6
1 files changed, 5 insertions, 1 deletions
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 <algorithm>
#include <iostream>
@@ -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());
OpenPOWER on IntegriCloud