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: Id2036ab746164981596b3ee36259f3ca5d3f1334
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/src/biosconfigcommands.cpp b/src/biosconfigcommands.cpp
index 8fbdbf5..ba2610a 100644
--- a/src/biosconfigcommands.cpp
+++ b/src/biosconfigcommands.cpp
@@ -199,8 +199,8 @@
return false;
}
- std::string service = getService(*dbus, biosConfigIntf,
- biosConfigBaseMgrPath);
+ std::string service =
+ getService(*dbus, biosConfigIntf, biosConfigBaseMgrPath);
try
{
@@ -404,20 +404,20 @@
{
pSdBusPlus->async_method_call(
[](const boost::system::error_code ec) {
- /* No more need to keep attributes data in memory */
- attributesData.clear();
+ /* No more need to keep attributes data in memory */
+ attributesData.clear();
- if (ec)
- {
- phosphor::logging::log<phosphor::logging::level::ERR>(
- "sendAllAttributes error: send all attributes - "
- "failed");
- return;
- }
+ if (ec)
+ {
+ phosphor::logging::log<phosphor::logging::level::ERR>(
+ "sendAllAttributes error: send all attributes - "
+ "failed");
+ return;
+ }
- phosphor::logging::log<phosphor::logging::level::INFO>(
- "sendAllAttributes: send all attributes - done");
- },
+ phosphor::logging::log<phosphor::logging::level::INFO>(
+ "sendAllAttributes: send all attributes - done");
+ },
service, biosConfigBaseMgrPath,
"org.freedesktop.DBus.Properties", "Set", biosConfigIntf,
"BaseBIOSTable",
@@ -467,11 +467,11 @@
try
{
std::shared_ptr<sdbusplus::asio::connection> dbus = getSdBus();
- Value variant =
- getDbusProperty(*dbus, "xyz.openbmc_project.State.Host0",
- "/xyz/openbmc_project/state/host0",
- "xyz.openbmc_project.State.OperatingSystem.Status",
- "OperatingSystemState");
+ Value variant = getDbusProperty(
+ *dbus, "xyz.openbmc_project.State.Host0",
+ "/xyz/openbmc_project/state/host0",
+ "xyz.openbmc_project.State.OperatingSystem.Status",
+ "OperatingSystemState");
auto& value = std::get<std::string>(variant);
// The short strings "Standby" is deprecated in favor of the
@@ -498,8 +498,8 @@
try
{
std::shared_ptr<sdbusplus::asio::connection> dbus = getSdBus();
- std::string service = getService(*dbus, biosConfigIntf,
- biosConfigBaseMgrPath);
+ std::string service =
+ getService(*dbus, biosConfigIntf, biosConfigBaseMgrPath);
Value variant = getDbusProperty(*dbus, service, biosConfigBaseMgrPath,
biosConfigIntf, resetBIOSSettingsProp);
@@ -682,9 +682,9 @@
}
}
-ipmi::RspType<uint32_t> ipmiOEMSetPayload(ipmi::Context::ptr&, uint8_t paramSel,
- uint8_t payloadType,
- std::vector<uint8_t> payload)
+ipmi::RspType<uint32_t>
+ ipmiOEMSetPayload(ipmi::Context::ptr&, uint8_t paramSel,
+ uint8_t payloadType, std::vector<uint8_t> payload)
{
uint8_t biosCapOffsetBit = 2; // BIT:1 0-OOB BIOS config not supported
// 1-OOB BIOS config is supported
@@ -778,8 +778,8 @@
return ipmi::response(ipmiCCPayloadChecksumFailed);
}
// store the data in temp file
- std::string FilePath = "/var/oob/temp" +
- std::to_string(payloadType);
+ std::string FilePath =
+ "/var/oob/temp" + std::to_string(payloadType);
std::ofstream outFile(FilePath, std::ios::binary | std::ios::app);
outFile.seekp(pPayloadInProgress->payloadOffset);
@@ -816,12 +816,12 @@
{
return ipmi::response(ipmiCCPayloadPayloadInComplete);
}
- std::string tempFilePath = "/var/oob/temp" +
- std::to_string(payloadType);
- std::string payloadFilePath = "/var/oob/Payload" +
- std::to_string(payloadType);
- auto renamestatus = std::rename(tempFilePath.c_str(),
- payloadFilePath.c_str());
+ std::string tempFilePath =
+ "/var/oob/temp" + std::to_string(payloadType);
+ std::string payloadFilePath =
+ "/var/oob/Payload" + std::to_string(payloadType);
+ auto renamestatus =
+ std::rename(tempFilePath.c_str(), payloadFilePath.c_str());
if (renamestatus)
{
phosphor::logging::log<phosphor::logging::level::ERR>(
@@ -899,8 +899,8 @@
gNVOOBdata.payloadInfo[payloadType].payloadType = 0;
gNVOOBdata.payloadInfo[payloadType].payloadTotalSize = 0;
// Delete the temp file
- std::string tempFilePath = "/var/oob/temp" +
- std::to_string(payloadType);
+ std::string tempFilePath =
+ "/var/oob/temp" + std::to_string(payloadType);
unlink(tempFilePath.c_str());
flushNVOOBdata();
return ipmi::responseSuccess();
@@ -952,8 +952,8 @@
{
case ipmi::GetPayloadParameter::GetPayloadInfo:
{
- std::string payloadFilePath = "/var/oob/Payload" +
- std::to_string(payloadType);
+ std::string payloadFilePath =
+ "/var/oob/Payload" + std::to_string(payloadType);
std::ifstream ifs(payloadFilePath,
std::ios::in | std::ios::binary | std::ios::ate);
@@ -991,8 +991,8 @@
}
uint32_t offset = reqData.at(0);
uint32_t length = reqData.at(1);
- std::string payloadFilePath = "/var/oob/Payload" +
- std::to_string(payloadType);
+ std::string payloadFilePath =
+ "/var/oob/Payload" + std::to_string(payloadType);
if (length > static_cast<uint32_t>(maxGetPayloadDataSize))
{
@@ -1004,9 +1004,9 @@
return ipmi::responseInvalidFieldRequest();
}
- std::ifstream ifs(payloadFilePath, std::ios::in |
- std::ios::binary |
- std::ios::ate);
+ std::ifstream ifs(payloadFilePath,
+ std::ios::in | std::ios::binary |
+ std::ios::ate);
if (!ifs.good())
{