Add OpenBMC C++ clang-format file and format code
Change-Id: Ib3a388bf5392159440682265b577fba023c3c3aa
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
diff --git a/physical.cpp b/physical.cpp
index 38c69b0..e7ca582 100644
--- a/physical.cpp
+++ b/physical.cpp
@@ -14,9 +14,10 @@
* limitations under the License.
*/
+#include "physical.hpp"
+
#include <iostream>
#include <string>
-#include "physical.hpp"
namespace phosphor
{
namespace led
@@ -27,7 +28,7 @@
{
// Control files in /sys/class/leds/<led-name>
brightCtrl = path + BRIGHTNESS;
- blinkCtrl = path + BLINKCTRL;
+ blinkCtrl = path + BLINKCTRL;
delayOnCtrl = path + DELAYON;
delayOffCtrl = path + DELAYOFF;
@@ -66,14 +67,14 @@
if (brightness == std::string(ASSERT))
{
// LED is in Solid ON
- sdbusplus::xyz::openbmc_project::Led::server
- ::Physical::state(Action::On);
+ sdbusplus::xyz::openbmc_project::Led::server ::Physical::state(
+ Action::On);
}
else
{
// LED is in OFF state
- sdbusplus::xyz::openbmc_project::Led::server
- ::Physical::state(Action::Off);
+ sdbusplus::xyz::openbmc_project::Led::server ::Physical::state(
+ Action::Off);
}
}
return;
@@ -83,12 +84,12 @@
auto Physical::state(Action value) -> Action
{
// Obtain current operation
- auto current = sdbusplus::xyz::openbmc_project::Led::server
- ::Physical::state();
+ auto current =
+ sdbusplus::xyz::openbmc_project::Led::server ::Physical::state();
// Update requested operation into base class
- auto requested = sdbusplus::xyz::openbmc_project::Led::server
- ::Physical::state(value);
+ auto requested =
+ sdbusplus::xyz::openbmc_project::Led::server ::Physical::state(value);
// Apply the action.
driveLED(current, requested);
@@ -112,7 +113,7 @@
}
// Transition TO Stable states.
- if(request == Action::On || request == Action::Off)
+ if (request == Action::On || request == Action::Off)
{
return stableStateOperation(request);
}