clang-format: copy latest and re-format
clang-format-16 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest .clang-format from the docs repository and reformat the
repository.
Change-Id: I59c0a8c4b89131ecd3e9a841ed37ef3b8dcf8e9d
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/src/manufacturingcommands.cpp b/src/manufacturingcommands.cpp
index 644a2e2..3104c3e 100644
--- a/src/manufacturingcommands.cpp
+++ b/src/manufacturingcommands.cpp
@@ -185,7 +185,6 @@
void Manufacturing::revertTimerHandler()
{
-
#ifdef BMC_VALIDATION_UNSECURE_FEATURE
if (mtm.getMfgMode() == SpecialMode::valUnsecure)
{
@@ -672,9 +671,9 @@
pwmName = "Pwm_" + std::to_string(instance + 1);
}
fanPwmInstancePath = fanPwmPath + pwmName;
- ret =
- mtm.setProperty(fanService, fanPwmInstancePath, fanIntf,
- "Value", static_cast<double>(pwmValue));
+ ret = mtm.setProperty(fanService, fanPwmInstancePath,
+ fanIntf, "Value",
+ static_cast<double>(pwmValue));
if (ret < 0)
{
return ipmi::responseUnspecifiedError();
@@ -704,8 +703,8 @@
return ipmi::response(retCode);
}
- if ((mtm.mtmTestBeepFd =
- ::open(beepDevName, O_RDWR | O_CLOEXEC)) < 0)
+ if ((mtm.mtmTestBeepFd = ::open(beepDevName,
+ O_RDWR | O_CLOEXEC)) < 0)
{
lg2::error("Failed to open input device");
return ipmi::responseUnspecifiedError();
@@ -766,8 +765,8 @@
lg2::error("Failed to query HSBP drive sub tree objects");
return ipmi::responseUnspecifiedError();
}
- std::string driveObjPath =
- driveBasePath + "Drive_" + std::to_string(instance + 1);
+ std::string driveObjPath = driveBasePath + "Drive_" +
+ std::to_string(instance + 1);
if (std::find(driveList.begin(), driveList.end(), driveObjPath) ==
driveList.end())
{
@@ -981,8 +980,8 @@
writeData.push_back(static_cast<uint8_t>(macOffset));
std::vector<uint8_t> readBuf(macRecordSize);
std::string i2cBus = "/dev/i2c-" + std::to_string(fruBus);
- ipmi::Cc retI2C =
- ipmi::i2cWriteRead(i2cBus, fruAddress, writeData, readBuf);
+ ipmi::Cc retI2C = ipmi::i2cWriteRead(i2cBus, fruAddress, writeData,
+ readBuf);
if (retI2C == ipmi::ccSuccess)
{
uint8_t cs = calculateChecksum(readBuf.cbegin(), readBuf.cend());
@@ -1025,14 +1024,14 @@
writeData.push_back(macHeader);
std::for_each(ethData.cbegin(), ethData.cend(),
[&](uint8_t i) { writeData.push_back(i); });
- uint8_t macCheckSum =
- calculateChecksum(++writeData.cbegin(), writeData.cend());
+ uint8_t macCheckSum = calculateChecksum(++writeData.cbegin(),
+ writeData.cend());
writeData.push_back(macCheckSum);
std::string i2cBus = "/dev/i2c-" + std::to_string(fruBus);
std::vector<uint8_t> readBuf;
- ipmi::Cc ret =
- ipmi::i2cWriteRead(i2cBus, fruAddress, writeData, readBuf);
+ ipmi::Cc ret = ipmi::i2cWriteRead(i2cBus, fruAddress, writeData,
+ readBuf);
// prepare for read to detect chip is write protected
writeData.resize(1);
@@ -1266,8 +1265,8 @@
std::vector<uint8_t> readBuf(readCount);
- ipmi::Cc retI2C =
- ipmi::i2cWriteRead(i2cBus, targetAddr, writeData, readBuf);
+ ipmi::Cc retI2C = ipmi::i2cWriteRead(i2cBus, targetAddr, writeData,
+ readBuf);
if (retI2C != ipmi::ccSuccess)
{
return ipmi::response(retI2C);
@@ -1286,8 +1285,8 @@
std::vector<uint8_t> writeData = {0x61, 0x1};
std::vector<uint8_t> readBuf(0);
- ipmi::Cc retI2C =
- ipmi::i2cWriteRead(i2cBus, targetAddr, writeData, readBuf);
+ ipmi::Cc retI2C = ipmi::i2cWriteRead(i2cBus, targetAddr, writeData,
+ readBuf);
return ipmi::response(retI2C);
}
@@ -1407,8 +1406,8 @@
boost::algorithm::replace_first_copy(
objectPath, "/xyz/openbmc_project/inventory/system/board/", ""),
"/", "_2f");
- std::string unitName =
- "xyz.openbmc_project.mctpd@" + serviceArgument + ".service";
+ std::string unitName = "xyz.openbmc_project.mctpd@" + serviceArgument +
+ ".service";
return unitName;
}
@@ -1429,7 +1428,7 @@
for (const auto& objectPath : configPaths)
{
- auto const pos = objectPath.find_last_of('/');
+ const auto pos = objectPath.find_last_of('/');
if (binding == objectPath.substr(pos + 1))
{
return startOrStopService(ctx, enable,
@@ -1534,6 +1533,6 @@
ipmi::registerFilter(ipmi::prioOemBase,
[](ipmi::message::Request::ptr request) {
- return ipmi::mfgFilterMessage(request);
- });
+ return ipmi::mfgFilterMessage(request);
+ });
}