netipmid: apply clang-format rules
Lots of whitespace change. Let clang-format do its job and keep the code
looking nice.
Change-Id: Idfcad1a99cab8170d55a06163de8ad3f420b68b7
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
diff --git a/command/session_cmds.cpp b/command/session_cmds.cpp
index e199532..fb2d074 100644
--- a/command/session_cmds.cpp
+++ b/command/session_cmds.cpp
@@ -1,28 +1,31 @@
#include "session_cmds.hpp"
-#include <iostream>
-
#include "endian.hpp"
#include "main.hpp"
+
#include <host-ipmid/ipmid-api.h>
+#include <iostream>
+
namespace command
{
-std::vector<uint8_t> setSessionPrivilegeLevel(
- const std::vector<uint8_t>& inPayload, const message::Handler& handler)
+std::vector<uint8_t>
+ setSessionPrivilegeLevel(const std::vector<uint8_t>& inPayload,
+ const message::Handler& handler)
{
std::vector<uint8_t> outPayload(sizeof(SetSessionPrivLevelResp));
- auto request = reinterpret_cast<const SetSessionPrivLevelReq*>
- (inPayload.data());
- auto response = reinterpret_cast<SetSessionPrivLevelResp*>
- (outPayload.data());
+ auto request =
+ reinterpret_cast<const SetSessionPrivLevelReq*>(inPayload.data());
+ auto response =
+ reinterpret_cast<SetSessionPrivLevelResp*>(outPayload.data());
response->completionCode = IPMI_CC_OK;
uint8_t reqPrivilegeLevel = request->reqPrivLevel;
- auto session = (std::get<session::Manager&>(singletonPool).getSession(
- handler.sessionID)).lock();
+ auto session = (std::get<session::Manager&>(singletonPool)
+ .getSession(handler.sessionID))
+ .lock();
if (reqPrivilegeLevel == 0) // Just return present privilege level
{
@@ -30,8 +33,8 @@
}
else if (reqPrivilegeLevel <= static_cast<uint8_t>(session->maxPrivLevel))
{
- session->curPrivLevel = static_cast<session::Privilege>
- (reqPrivilegeLevel);
+ session->curPrivLevel =
+ static_cast<session::Privilege>(reqPrivilegeLevel);
response->newPrivLevel = reqPrivilegeLevel;
}
else
@@ -46,10 +49,10 @@
const message::Handler& handler)
{
std::vector<uint8_t> outPayload(sizeof(CloseSessionResponse));
- auto request = reinterpret_cast<const CloseSessionRequest*>
- (inPayload.data());
+ auto request =
+ reinterpret_cast<const CloseSessionRequest*>(inPayload.data());
auto response = reinterpret_cast<CloseSessionResponse*>(outPayload.data());
- response->completionCode = IPMI_CC_OK ;
+ response->completionCode = IPMI_CC_OK;
auto bmcSessionID = endian::from_ipmi(request->sessionID);
@@ -61,9 +64,9 @@
}
else
{
- auto status = std::get<session::Manager&>(singletonPool).stopSession
- (bmcSessionID);
- if(!status)
+ auto status = std::get<session::Manager&>(singletonPool)
+ .stopSession(bmcSessionID);
+ if (!status)
{
response->completionCode = IPMI_CC_INVALID_SESSIONID;
}