diff options
author | Patrick Venture <venture@google.com> | 2018-08-31 11:55:55 -0700 |
---|---|---|
committer | Patrick Venture <venture@google.com> | 2018-09-07 23:45:41 +0000 |
commit | 0b02be925a29357f69abbc9e9a58e7c5aaed2eab (patch) | |
tree | c1b39f817d98ffda7b987f9e3f864f576e3bf9ea /softoff/mainapp.cpp | |
parent | 26f80ab2cc41deadc913190d906f71266c4ed224 (diff) | |
download | phosphor-host-ipmid-0b02be925a29357f69abbc9e9a58e7c5aaed2eab.tar.gz phosphor-host-ipmid-0b02be925a29357f69abbc9e9a58e7c5aaed2eab.zip |
add .clang-format
Change-Id: I7c2a527b4751a560703a61fcbe9638b150546af5
Signed-off-by: Patrick Venture <venture@google.com>
Diffstat (limited to 'softoff/mainapp.cpp')
-rw-r--r-- | softoff/mainapp.cpp | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/softoff/mainapp.cpp b/softoff/mainapp.cpp index 3a47cc4..3b153a8 100644 --- a/softoff/mainapp.cpp +++ b/softoff/mainapp.cpp @@ -13,13 +13,16 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +#include "config.h" + +#include "softoff.hpp" +#include "timer.hpp" + #include <systemd/sd-event.h> -#include <phosphor-logging/elog.hpp> + #include <phosphor-logging/elog-errors.hpp> +#include <phosphor-logging/elog.hpp> #include <xyz/openbmc_project/State/Host/error.hpp> -#include "softoff.hpp" -#include "config.h" -#include "timer.hpp" // Return -1 on any errors to ensure we follow the calling targets OnFailure= // path @@ -41,7 +44,7 @@ int main(int argc, char** argv) if (r < 0) { log<level::ERR>("Failure to create sd_event handler", - entry("ERRNO=0x%X", -r)); + entry("ERRNO=0x%X", -r)); return -1; } @@ -58,22 +61,23 @@ int main(int argc, char** argv) // Wait for client requests until this application has processed // at least one successful SoftPowerOff or we timed out - while(!powerObj.isCompleted() && !powerObj.isTimerExpired()) + while (!powerObj.isCompleted() && !powerObj.isTimerExpired()) { // -1 denotes wait for ever r = sd_event_run(events, (uint64_t)-1); if (r < 0) { log<level::ERR>("Failure in processing request", - entry("ERRNO=0x%X", -r)); + entry("ERRNO=0x%X", -r)); return -1; } } // Log an error if we timed out after getting Ack for SMS_ATN and before // getting the Host Shutdown response - if(powerObj.isTimerExpired() && (powerObj.responseReceived() == - phosphor::ipmi::Base::SoftPowerOff::HostResponse::SoftOffReceived)) + if (powerObj.isTimerExpired() && + (powerObj.responseReceived() == + phosphor::ipmi::Base::SoftPowerOff::HostResponse::SoftOffReceived)) { using error = sdbusplus::xyz::openbmc_project::State::Host::Error::SoftOffTimeout; |