clang-format: re-format for clang-18
clang-format-18 isn't compatible with the clang-format-17 output, so we
need to reformat the code with the latest version. The way clang-18
handles lambda formatting also changed, so we have made changes to the
organization default style format to better handle lambda formatting.
See I5e08687e696dd240402a2780158664b7113def0e for updated style.
See Iea0776aaa7edd483fa395e23de25ebf5a6288f71 for clang-18 enablement.
Change-Id: Ide19264aa5b2b01a5102b4b2a9cf226ba8dec699
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/src/storagecommands.cpp b/src/storagecommands.cpp
index 346171c..84801ba 100644
--- a/src/storagecommands.cpp
+++ b/src/storagecommands.cpp
@@ -304,10 +304,9 @@
return IPMI_CC_OK;
}
-ipmi_ret_t ipmiStorageReadFRUData(ipmi_netfn_t, ipmi_cmd_t,
- ipmi_request_t request,
- ipmi_response_t response,
- ipmi_data_len_t dataLen, ipmi_context_t)
+ipmi_ret_t ipmiStorageReadFRUData(
+ ipmi_netfn_t, ipmi_cmd_t, ipmi_request_t request, ipmi_response_t response,
+ ipmi_data_len_t dataLen, ipmi_context_t)
{
if (*dataLen != 4)
{
@@ -355,10 +354,9 @@
return IPMI_CC_OK;
}
-ipmi_ret_t ipmiStorageWriteFRUData(ipmi_netfn_t, ipmi_cmd_t,
- ipmi_request_t request,
- ipmi_response_t response,
- ipmi_data_len_t dataLen, ipmi_context_t)
+ipmi_ret_t ipmiStorageWriteFRUData(
+ ipmi_netfn_t, ipmi_cmd_t, ipmi_request_t request, ipmi_response_t response,
+ ipmi_data_len_t dataLen, ipmi_context_t)
{
if (*dataLen < 4 ||
*dataLen >=
@@ -481,31 +479,33 @@
return IPMI_CC_RESPONSE_ERROR;
}
boost::container::flat_map<std::string, DbusVariant>* fruData = nullptr;
- auto fru = std::find_if(frus.begin(), frus.end(),
- [bus, address, &fruData](ManagedEntry& entry) {
- auto findFruDevice = entry.second.find("xyz.openbmc_project.FruDevice");
- if (findFruDevice == entry.second.end())
- {
- return false;
- }
- fruData = &(findFruDevice->second);
- auto findBus = findFruDevice->second.find("BUS");
- auto findAddress = findFruDevice->second.find("ADDRESS");
- if (findBus == findFruDevice->second.end() ||
- findAddress == findFruDevice->second.end())
- {
- return false;
- }
- if (std::get<uint32_t>(findBus->second) != bus)
- {
- return false;
- }
- if (std::get<uint32_t>(findAddress->second) != address)
- {
- return false;
- }
- return true;
- });
+ auto fru = std::find_if(
+ frus.begin(), frus.end(),
+ [bus, address, &fruData](ManagedEntry& entry) {
+ auto findFruDevice =
+ entry.second.find("xyz.openbmc_project.FruDevice");
+ if (findFruDevice == entry.second.end())
+ {
+ return false;
+ }
+ fruData = &(findFruDevice->second);
+ auto findBus = findFruDevice->second.find("BUS");
+ auto findAddress = findFruDevice->second.find("ADDRESS");
+ if (findBus == findFruDevice->second.end() ||
+ findAddress == findFruDevice->second.end())
+ {
+ return false;
+ }
+ if (std::get<uint32_t>(findBus->second) != bus)
+ {
+ return false;
+ }
+ if (std::get<uint32_t>(findAddress->second) != address)
+ {
+ return false;
+ }
+ return true;
+ });
if (fru == frus.end())
{
return IPMI_CC_RESPONSE_ERROR;
@@ -968,10 +968,9 @@
return -1;
}
-ipmi_ret_t ipmiStorageGetFRUInvAreaInfo(ipmi_netfn_t, ipmi_cmd_t,
- ipmi_request_t request,
- ipmi_response_t response,
- ipmi_data_len_t dataLen, ipmi_context_t)
+ipmi_ret_t ipmiStorageGetFRUInvAreaInfo(
+ ipmi_netfn_t, ipmi_cmd_t, ipmi_request_t request, ipmi_response_t response,
+ ipmi_data_len_t dataLen, ipmi_context_t)
{
if (*dataLen != 1)
{