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: Id6c141dd4eba2423f476499b999aec9cb42f6192
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/.clang-format b/.clang-format
index d43e884..28e3328 100644
--- a/.clang-format
+++ b/.clang-format
@@ -87,7 +87,7 @@
IndentWrappedFunctionNames: true
InsertNewlineAtEOF: true
KeepEmptyLinesAtTheStartOfBlocks: false
-LambdaBodyIndentation: OuterScope
+LambdaBodyIndentation: Signature
LineEnding: LF
MacroBlockBegin: ''
MacroBlockEnd: ''
@@ -98,13 +98,14 @@
ObjCSpaceBeforeProtocolList: true
PackConstructorInitializers: BinPack
PenaltyBreakAssignment: 25
-PenaltyBreakBeforeFirstCallParameter: 19
+PenaltyBreakBeforeFirstCallParameter: 50
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
+PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
-PenaltyIndentedWhitespace: 0
+PenaltyIndentedWhitespace: 1
PointerAlignment: Left
QualifierAlignment: Left
ReferenceAlignment: Left
diff --git a/activation.cpp b/activation.cpp
index 28f6bcc..e4e4004 100644
--- a/activation.cpp
+++ b/activation.cpp
@@ -269,8 +269,8 @@
bool Activation::fieldModeEnabled()
{
- auto fieldModeSvc = utils::getService(bus, FIELDMODE_PATH,
- FIELDMODE_INTERFACE);
+ auto fieldModeSvc =
+ utils::getService(bus, FIELDMODE_PATH, FIELDMODE_INTERFACE);
auto method = bus.new_method_call(fieldModeSvc.c_str(), FIELDMODE_PATH,
"org.freedesktop.DBus.Properties", "Get");
diff --git a/functions.cpp b/functions.cpp
index d345489..9b1d664 100644
--- a/functions.cpp
+++ b/functions.cpp
@@ -184,8 +184,8 @@
const LinkCallbackType& linkCallback)
{
std::error_code ec;
- std::filesystem::directory_iterator directoryIterator(hostFirmwareDirectory,
- ec);
+ std::filesystem::directory_iterator directoryIterator(
+ hostFirmwareDirectory, ec);
if (ec)
{
makeCallback(errorCallback, hostFirmwareDirectory, ec);
@@ -348,8 +348,8 @@
// Create symlinks from the hostfw elements to their corresponding
// lid files if they don't exist
- auto elementFilePath = std::filesystem::path("/media/hostfw/running") /
- a.first;
+ auto elementFilePath =
+ std::filesystem::path("/media/hostfw/running") / a.first;
if (!std::filesystem::exists(elementFilePath))
{
std::error_code ec;
@@ -445,11 +445,12 @@
* @return true if interfacesAndProperties contained an instance of
* xyz.openbmc_project.Inventory.Decorator.Compatible, false otherwise
*/
-bool maybeCall(const std::map<std::string,
- std::map<std::string,
- std::variant<std::vector<std::string>>>>&
- interfacesAndProperties,
- const MaybeCallCallbackType& callback)
+bool maybeCall(
+ const std::map<
+ std::string,
+ std::map<std::string, std::variant<std::vector<std::string>>>>&
+ interfacesAndProperties,
+ const MaybeCallCallbackType& callback)
{
using namespace std::string_literals;
@@ -634,23 +635,23 @@
"xyz.openbmc_project.EntityManager"),
[pExtensionMap, pHostFirmwareDirectory, pErrorCallback,
&loop](auto& message) {
- // bind the extension map, host firmware directory, and error
- // callback to the maybeMakeLinks function.
- auto maybeMakeLinksWithArgsBound =
- std::bind(maybeMakeLinks, std::cref(*pExtensionMap),
- std::cref(*pHostFirmwareDirectory), std::placeholders::_1,
- std::cref(*pErrorCallback));
+ // bind the extension map, host firmware directory, and error
+ // callback to the maybeMakeLinks function.
+ auto maybeMakeLinksWithArgsBound =
+ std::bind(maybeMakeLinks, std::cref(*pExtensionMap),
+ std::cref(*pHostFirmwareDirectory),
+ std::placeholders::_1, std::cref(*pErrorCallback));
- // if the InterfacesAdded message contains an an instance of
- // xyz.openbmc_project.Inventory.Decorator.Compatible, check to see if
- // links are necessary on this system and if so, create them.
- if (maybeCallMessage(message, maybeMakeLinksWithArgsBound))
- {
- // The Compatible interface was found and the links were created if
- // applicable. Instruct the event loop / subcommand to exit.
- loop.exit(0);
- }
- });
+ // if the InterfacesAdded message contains an an instance of
+ // xyz.openbmc_project.Inventory.Decorator.Compatible, check to see
+ // if links are necessary on this system and if so, create them.
+ if (maybeCallMessage(message, maybeMakeLinksWithArgsBound))
+ {
+ // The Compatible interface was found and the links were created
+ // if applicable. Instruct the event loop / subcommand to exit.
+ loop.exit(0);
+ }
+ });
// now that we'll get a callback in the event of an InterfacesAdded signal
// (potentially containing
@@ -748,11 +749,11 @@
"xyz.openbmc_project.EntityManager"),
[pldmPath, pExtensionMap, pElementsJsonFilePath,
maybeSetAttrWithArgsBound, &loop](auto& message) {
- if (maybeCallMessage(message, maybeSetAttrWithArgsBound))
- {
- loop.exit(0);
- }
- }));
+ if (maybeCallMessage(message, maybeSetAttrWithArgsBound))
+ {
+ loop.exit(0);
+ }
+ }));
// The BIOS attribute table can only be updated if PLDM is running because
// PLDM is the one that exposes this property. Add a match to monitor when
@@ -764,29 +765,30 @@
"xyz.openbmc_project.PLDM"),
[pExtensionMap, pElementsJsonFilePath, maybeSetAttrWithArgsBound,
&loop](auto& message) {
- std::string name;
- std::string oldOwner;
- std::string newOwner;
- message.read(name, oldOwner, newOwner);
+ std::string name;
+ std::string oldOwner;
+ std::string newOwner;
+ message.read(name, oldOwner, newOwner);
- if (newOwner.empty())
- {
- return;
- }
-
- auto bus = sdbusplus::bus::new_default();
- InterfacesPropertiesMap interfacesAndProperties;
- auto objects = getManagedObjects(bus, entityManagerServiceName,
- "/xyz/openbmc_project/inventory");
- for (const auto& pair : objects)
- {
- std::tie(std::ignore, interfacesAndProperties) = pair;
- if (maybeCall(interfacesAndProperties, maybeSetAttrWithArgsBound))
+ if (newOwner.empty())
{
- loop.exit(0);
+ return;
}
- }
- }));
+
+ auto bus = sdbusplus::bus::new_default();
+ InterfacesPropertiesMap interfacesAndProperties;
+ auto objects = getManagedObjects(bus, entityManagerServiceName,
+ "/xyz/openbmc_project/inventory");
+ for (const auto& pair : objects)
+ {
+ std::tie(std::ignore, interfacesAndProperties) = pair;
+ if (maybeCall(interfacesAndProperties,
+ maybeSetAttrWithArgsBound))
+ {
+ loop.exit(0);
+ }
+ }
+ }));
InterfacesPropertiesMap interfacesAndProperties;
auto objects = getManagedObjects(bus, entityManagerServiceName,
diff --git a/functions.hpp b/functions.hpp
index 2fa25c0..3462643 100644
--- a/functions.hpp
+++ b/functions.hpp
@@ -46,9 +46,8 @@
std::shared_ptr<void> processHostFirmware(
sdbusplus::bus_t&, std::map<std::string, std::vector<std::string>>,
std::filesystem::path, ErrorCallbackType, sdeventplus::Event&);
-std::vector<std::shared_ptr<void>>
- updateBiosAttrTable(sdbusplus::bus_t&,
- std::map<std::string, std::vector<std::string>>,
- std::filesystem::path, sdeventplus::Event&);
+std::vector<std::shared_ptr<void>> updateBiosAttrTable(
+ sdbusplus::bus_t&, std::map<std::string, std::vector<std::string>>,
+ std::filesystem::path, sdeventplus::Event&);
} // namespace process_hostfirmware
} // namespace functions
diff --git a/image_verify.cpp b/image_verify.cpp
index 09d5cec..b2c7edd 100644
--- a/image_verify.cpp
+++ b/image_verify.cpp
@@ -34,8 +34,8 @@
Signature::Signature(const std::filesystem::path& imageDirPath,
const std::string& pnorFileName,
const std::filesystem::path& signedConfPath) :
- imageDirPath(imageDirPath),
- pnorFileName(pnorFileName), signedConfPath(signedConfPath)
+ imageDirPath(imageDirPath), pnorFileName(pnorFileName),
+ signedConfPath(signedConfPath)
{
std::filesystem::path file(imageDirPath / MANIFEST_FILE);
@@ -167,8 +167,8 @@
for (const auto& keyType : keyTypes)
{
auto keyHashPair = getKeyHashFileNames(keyType);
- auto keyValues = Version::getValue(keyHashPair.first,
- {{hashFunctionTag, " "}});
+ auto keyValues =
+ Version::getValue(keyHashPair.first, {{hashFunctionTag, " "}});
auto hashFunc = keyValues.at(hashFunctionTag);
try
diff --git a/item_updater.cpp b/item_updater.cpp
index 5b27534..3173481 100644
--- a/item_updater.cpp
+++ b/item_updater.cpp
@@ -114,8 +114,8 @@
path, versionId, extendedVersion, activationState, associations);
activations.emplace(versionId, std::move(activation));
- auto versionPtr = createVersionObject(path, versionId, version, purpose,
- filePath);
+ auto versionPtr =
+ createVersionObject(path, versionId, version, purpose, filePath);
versions.emplace(versionId, std::move(versionPtr));
}
return;
diff --git a/item_updater.hpp b/item_updater.hpp
index 40cdcd2..e444055 100644
--- a/item_updater.hpp
+++ b/item_updater.hpp
@@ -188,13 +188,12 @@
AssociationList& assocs) = 0;
/** @brief Create Version object */
- virtual std::unique_ptr<Version>
- createVersionObject(const std::string& objPath,
- const std::string& versionId,
- const std::string& versionString,
- sdbusplus::xyz::openbmc_project::Software::server::
- Version::VersionPurpose versionPurpose,
- const std::string& filePath) = 0;
+ virtual std::unique_ptr<Version> createVersionObject(
+ const std::string& objPath, const std::string& versionId,
+ const std::string& versionString,
+ sdbusplus::xyz::openbmc_project::Software::server::Version::
+ VersionPurpose versionPurpose,
+ const std::string& filePath) = 0;
/** @brief Validate if image is valid or not */
virtual bool validateImage(const std::string& path) = 0;
diff --git a/item_updater_main.cpp b/item_updater_main.cpp
index fe39586..efada13 100644
--- a/item_updater_main.cpp
+++ b/item_updater_main.cpp
@@ -87,28 +87,30 @@
app.add_subcommand("process-host-firmware",
"Point the host firmware at its data.")
->callback([&bus, &loop, &subcommandContext, extensionMap]() {
- auto hostFirmwareDirectory = "/media/hostfw/running"s;
- auto logCallback = [](const auto& path, auto& ec) {
- std::cerr << path << ": " << ec.message() << "\n";
- };
- subcommandContext.push_back(
- functions::process_hostfirmware::processHostFirmware(
- bus, extensionMap, std::move(hostFirmwareDirectory),
- std::move(logCallback), loop));
- }));
+ auto hostFirmwareDirectory = "/media/hostfw/running"s;
+ auto logCallback = [](const auto& path, auto& ec) {
+ std::cerr << path << ": " << ec.message() << "\n";
+ };
+ subcommandContext.push_back(
+ functions::process_hostfirmware::processHostFirmware(
+ bus, extensionMap, std::move(hostFirmwareDirectory),
+ std::move(logCallback), loop));
+ }));
static_cast<void>(
app.add_subcommand("update-bios-attr-table",
"Update the bios attribute table with the host "
"firmware data details.")
->callback([&bus, &loop, &subcommandContext, extensionMap]() {
- auto elementsJsonFilePath = "/usr/share/hostfw/elements.json"s;
- auto subcommands = functions::process_hostfirmware::updateBiosAttrTable(
- bus, extensionMap, std::move(elementsJsonFilePath), loop);
- for (const auto& subcommand : subcommands)
- {
- subcommandContext.push_back(subcommand);
- }
- }));
+ auto elementsJsonFilePath = "/usr/share/hostfw/elements.json"s;
+ auto subcommands =
+ functions::process_hostfirmware::updateBiosAttrTable(
+ bus, extensionMap, std::move(elementsJsonFilePath),
+ loop);
+ for (const auto& subcommand : subcommands)
+ {
+ subcommandContext.push_back(subcommand);
+ }
+ }));
CLI11_PARSE(app, argc, argv);
diff --git a/mmc/item_updater_mmc.cpp b/mmc/item_updater_mmc.cpp
index 0c47efa..5a37041 100644
--- a/mmc/item_updater_mmc.cpp
+++ b/mmc/item_updater_mmc.cpp
@@ -62,9 +62,9 @@
void ItemUpdaterMMC::reset()
{
// Do not reset read-only files needed for reset or ext4 default files
- const std::vector<std::string> exclusionList = {"alternate", "hostfw-a",
- "hostfw-b", "lost+found",
- "nvram", "running-ro"};
+ const std::vector<std::string> exclusionList = {
+ "alternate", "hostfw-a", "hostfw-b",
+ "lost+found", "nvram", "running-ro"};
std::filesystem::path dirPath(std::string(MEDIA_DIR "hostfw/"));
// Delete all files in /media/hostfw/ except for those on exclusionList
for (const auto& p : std::filesystem::directory_iterator(dirPath))
@@ -177,9 +177,9 @@
response.read(objs);
for (auto& obj : objs)
{
- auto method = bus.new_method_call(service.c_str(), obj.c_str(),
- "org.freedesktop.DBus.Properties",
- "Set");
+ auto method =
+ bus.new_method_call(service.c_str(), obj.c_str(),
+ "org.freedesktop.DBus.Properties", "Set");
std::variant<bool> propertyVal{true};
method.append("xyz.openbmc_project.Object.Enable", "Enabled",
propertyVal);
diff --git a/mmc/item_updater_mmc.hpp b/mmc/item_updater_mmc.hpp
index 2ef77e4..fc2b6a4 100644
--- a/mmc/item_updater_mmc.hpp
+++ b/mmc/item_updater_mmc.hpp
@@ -83,13 +83,12 @@
AssociationList& assocs) override;
/** @brief Create Version object */
- std::unique_ptr<Version>
- createVersionObject(const std::string& objPath,
- const std::string& versionId,
- const std::string& versionString,
- sdbusplus::xyz::openbmc_project::Software::server::
- Version::VersionPurpose versionPurpose,
- const std::string& filePath) override;
+ std::unique_ptr<Version> createVersionObject(
+ const std::string& objPath, const std::string& versionId,
+ const std::string& versionString,
+ sdbusplus::xyz::openbmc_project::Software::server::Version::
+ VersionPurpose versionPurpose,
+ const std::string& filePath) override;
/** @brief Validate if image is valid or not */
bool validateImage(const std::string& path);
diff --git a/msl_verify.hpp b/msl_verify.hpp
index e726c61..2a5b00d 100644
--- a/msl_verify.hpp
+++ b/msl_verify.hpp
@@ -27,7 +27,7 @@
* @param[in] minShipLevel - Minimum Ship Level string
*/
explicit MinimumShipLevel(const std::string& minShipLevel) :
- minShipLevel(minShipLevel){};
+ minShipLevel(minShipLevel) {};
/** @brief Verify if the current PNOR version meets the min ship level
* @return true if the verification succeeded, false otherwise
diff --git a/static/activation_static.cpp b/static/activation_static.cpp
index a4cc6d1..2d42c6b 100644
--- a/static/activation_static.cpp
+++ b/static/activation_static.cpp
@@ -98,8 +98,8 @@
std::replace(pnorFileEscaped.begin(), pnorFileEscaped.end(), '/', '-');
constexpr auto updatePNORService = "openpower-pnor-update@";
- pnorUpdateUnit = std::string(updatePNORService) + pnorFileEscaped +
- ".service";
+ pnorUpdateUnit =
+ std::string(updatePNORService) + pnorFileEscaped + ".service";
auto method = bus.new_method_call(SYSTEMD_BUSNAME, SYSTEMD_PATH,
SYSTEMD_INTERFACE, "StartUnit");
method.append(pnorUpdateUnit, "replace");
@@ -139,8 +139,8 @@
// Set Redundancy Priority before setting to Active
if (!redundancyPriority)
{
- redundancyPriority = std::make_unique<RedundancyPriority>(bus, path,
- *this, 0);
+ redundancyPriority =
+ std::make_unique<RedundancyPriority>(bus, path, *this, 0);
}
activationProgress->progress(100);
diff --git a/static/item_updater_static.cpp b/static/item_updater_static.cpp
index 24873fd..b931681 100644
--- a/static/item_updater_static.cpp
+++ b/static/item_updater_static.cpp
@@ -79,8 +79,8 @@
fs::path versionFile = tmpDir;
versionFile /= "version";
- auto [rc, r] = pflash("-P VERSION -r", versionFile.string(),
- "2>&1 > /dev/null");
+ auto [rc, r] =
+ pflash("-P VERSION -r", versionFile.string(), "2>&1 > /dev/null");
if (rc != 0)
{
log<level::ERR>("Failed to read VERSION", entry("RETURNCODE=%d", rc));
@@ -267,9 +267,9 @@
if (activationState == server::Activation::Activations::Active)
{
// Create an association to the host inventory item
- associations.emplace_back(std::make_tuple(ACTIVATION_FWD_ASSOCIATION,
- ACTIVATION_REV_ASSOCIATION,
- HOST_INVENTORY_PATH));
+ associations.emplace_back(
+ std::make_tuple(ACTIVATION_FWD_ASSOCIATION,
+ ACTIVATION_REV_ASSOCIATION, HOST_INVENTORY_PATH));
// Create an active association since this image is active
createActiveAssociation(path);
@@ -280,10 +280,10 @@
createUpdateableAssociation(path);
// Create Activation instance for this version.
- activations.insert(std::make_pair(
- id, std::make_unique<ActivationStatic>(bus, path, *this, id,
- extendedVersion, activationState,
- associations)));
+ activations.insert(
+ std::make_pair(id, std::make_unique<ActivationStatic>(
+ bus, path, *this, id, extendedVersion,
+ activationState, associations)));
// If Active, create RedundancyPriority instance for this version.
if (activationState == server::Activation::Activations::Active)
diff --git a/static/item_updater_static.hpp b/static/item_updater_static.hpp
index f992994..77409ba 100644
--- a/static/item_updater_static.hpp
+++ b/static/item_updater_static.hpp
@@ -64,13 +64,12 @@
AssociationList& assocs) override;
/** @brief Create Version object */
- std::unique_ptr<Version>
- createVersionObject(const std::string& objPath,
- const std::string& versionId,
- const std::string& versionString,
- sdbusplus::xyz::openbmc_project::Software::server::
- Version::VersionPurpose versionPurpose,
- const std::string& filePath) override;
+ std::unique_ptr<Version> createVersionObject(
+ const std::string& objPath, const std::string& versionId,
+ const std::string& versionString,
+ sdbusplus::xyz::openbmc_project::Software::server::Version::
+ VersionPurpose versionPurpose,
+ const std::string& filePath) override;
/** @brief Validate if image is valid or not */
bool validateImage(const std::string& path);
diff --git a/test/test_signature.cpp b/test/test_signature.cpp
index 0af5500..26e71d7 100644
--- a/test/test_signature.cpp
+++ b/test/test_signature.cpp
@@ -71,8 +71,8 @@
command("openssl rsa -in " + pkeyFile + " -outform PEM " +
"-pubout -out " + pubkeyFile);
- std::string pubKeyConfFile = signedConfPNORPath.string() + "/" +
- "publickey";
+ std::string pubKeyConfFile =
+ signedConfPNORPath.string() + "/" + "publickey";
command("cp " + pubkeyFile + " " + signedConfPNORPath.string());
command(opensslCmd + pkeyFile + " -out " + pnorFile + ".sig " +
pnorFile);
diff --git a/test/test_version.cpp b/test/test_version.cpp
index 448d95e..1e60ab8 100644
--- a/test/test_version.cpp
+++ b/test/test_version.cpp
@@ -48,18 +48,19 @@
"\tsbe-cf61dc3\n"
"\thcode-hw123119a.930";
- const auto& [version,
- extendedVersion] = Version::getVersions(versionString);
+ const auto& [version, extendedVersion] =
+ Version::getVersions(versionString);
EXPECT_EQ(version, "open-power-romulus-v2.2-rc1-48-g268344f-dirty");
- EXPECT_EQ(extendedVersion, "buildroot-2018.11.1-7-g5d7cc8c,"
- "skiboot-v6.2,"
- "hostboot-3f1f218-pea87ca7,"
- "occ-12c8088,"
- "linux-4.19.13-openpower1-p8031295,"
- "petitboot-1.9.2,"
- "machine-xml-7410460,"
- "hostboot-binaries-hw121518a.930,"
- "capp-ucode-p9-dd2-v4,"
- "sbe-cf61dc3,"
- "hcode-hw123119a.930");
+ EXPECT_EQ(extendedVersion,
+ "buildroot-2018.11.1-7-g5d7cc8c,"
+ "skiboot-v6.2,"
+ "hostboot-3f1f218-pea87ca7,"
+ "occ-12c8088,"
+ "linux-4.19.13-openpower1-p8031295,"
+ "petitboot-1.9.2,"
+ "machine-xml-7410460,"
+ "hostboot-binaries-hw121518a.930,"
+ "capp-ucode-p9-dd2-v4,"
+ "sbe-cf61dc3,"
+ "hcode-hw123119a.930");
}
diff --git a/ubi/activation_ubi.cpp b/ubi/activation_ubi.cpp
index 3bb7c25..fd77b36 100644
--- a/ubi/activation_ubi.cpp
+++ b/ubi/activation_ubi.cpp
@@ -118,8 +118,8 @@
}
constexpr auto ubimountService = "obmc-flash-bios-ubimount@";
- auto ubimountServiceFile = std::string(ubimountService) + versionId +
- ".service";
+ auto ubimountServiceFile =
+ std::string(ubimountService) + versionId + ".service";
auto method = bus.new_method_call(SYSTEMD_BUSNAME, SYSTEMD_PATH,
SYSTEMD_INTERFACE, "StartUnit");
method.append(ubimountServiceFile, "replace");
@@ -138,8 +138,8 @@
// Read the msg and populate each variable
msg.read(newStateID, newStateObjPath, newStateUnit, newStateResult);
- auto ubimountServiceFile = "obmc-flash-bios-ubimount@" + versionId +
- ".service";
+ auto ubimountServiceFile =
+ "obmc-flash-bios-ubimount@" + versionId + ".service";
if (newStateUnit == ubimountServiceFile && newStateResult == "done")
{
@@ -168,8 +168,8 @@
// Set Redundancy Priority before setting to Active
if (!redundancyPriority)
{
- redundancyPriority = std::make_unique<RedundancyPriorityUbi>(bus, path,
- *this, 0);
+ redundancyPriority =
+ std::make_unique<RedundancyPriorityUbi>(bus, path, *this, 0);
}
activationProgress->progress(100);
diff --git a/ubi/item_updater_ubi.cpp b/ubi/item_updater_ubi.cpp
index 13623d6..32920c2 100644
--- a/ubi/item_updater_ubi.cpp
+++ b/ubi/item_updater_ubi.cpp
@@ -147,8 +147,8 @@
auto versionPtr = std::make_unique<Version>(
bus, path, *this, id, version, purpose, "",
std::bind(&ItemUpdaterUbi::erase, this, std::placeholders::_1));
- versionPtr->deleteObject = std::make_unique<Delete>(bus, path,
- *versionPtr);
+ versionPtr->deleteObject =
+ std::make_unique<Delete>(bus, path, *versionPtr);
versions.insert(std::make_pair(id, std::move(versionPtr)));
}
else if (0 == iter.path().native().compare(0, PNOR_RW_PREFIX_LEN,
diff --git a/ubi/item_updater_ubi.hpp b/ubi/item_updater_ubi.hpp
index ba80a83..69cc066 100644
--- a/ubi/item_updater_ubi.hpp
+++ b/ubi/item_updater_ubi.hpp
@@ -70,13 +70,12 @@
Activations activationStatus,
AssociationList& assocs) override;
- std::unique_ptr<Version>
- createVersionObject(const std::string& objPath,
- const std::string& versionId,
- const std::string& versionString,
- sdbusplus::xyz::openbmc_project::Software::server::
- Version::VersionPurpose versionPurpose,
- const std::string& filePath) override;
+ std::unique_ptr<Version> createVersionObject(
+ const std::string& objPath, const std::string& versionId,
+ const std::string& versionString,
+ sdbusplus::xyz::openbmc_project::Software::server::Version::
+ VersionPurpose versionPurpose,
+ const std::string& filePath) override;
bool validateImage(const std::string& path) override;
diff --git a/ubi/serialize.cpp b/ubi/serialize.cpp
index 50127a2..4aa492a 100644
--- a/ubi/serialize.cpp
+++ b/ubi/serialize.cpp
@@ -116,8 +116,8 @@
auto bus = sdbusplus::bus::new_default();
// Clear the environment variable pnor-[versionId].
- std::string serviceFile = "obmc-flash-bmc-setenv@pnor\\x2d" + versionId +
- ".service";
+ std::string serviceFile =
+ "obmc-flash-bmc-setenv@pnor\\x2d" + versionId + ".service";
auto method = bus.new_method_call(SYSTEMD_BUSNAME, SYSTEMD_PATH,
SYSTEMD_INTERFACE, "StartUnit");
method.append(serviceFile, "replace");
diff --git a/ubi/watch.cpp b/ubi/watch.cpp
index 1b68fd1..fa9441a 100644
--- a/ubi/watch.cpp
+++ b/ubi/watch.cpp
@@ -27,8 +27,7 @@
Watch::Watch(sd_event* loop,
std::function<void(const std::string&)> functionalCallback) :
- functionalCallback(functionalCallback),
- fd(inotifyInit())
+ functionalCallback(functionalCallback), fd(inotifyInit())
{
// Create PNOR_ACTIVE_PATH if doesn't exist.
diff --git a/version.cpp b/version.cpp
index 7ab2c48..99ca119 100644
--- a/version.cpp
+++ b/version.cpp
@@ -52,9 +52,8 @@
return mdString;
}
-std::map<std::string, std::string>
- Version::getValue(const std::string& filePath,
- std::map<std::string, std::string> keys)
+std::map<std::string, std::string> Version::getValue(
+ const std::string& filePath, std::map<std::string, std::string> keys)
{
if (filePath.empty())
{
diff --git a/version.hpp b/version.hpp
index 9d2fa50..5c166bb 100644
--- a/version.hpp
+++ b/version.hpp
@@ -129,9 +129,8 @@
*
* @return The map of keys with filled values.
**/
- static std::map<std::string, std::string>
- getValue(const std::string& filePath,
- std::map<std::string, std::string> keys);
+ static std::map<std::string, std::string> getValue(
+ const std::string& filePath, std::map<std::string, std::string> keys);
/**
* @brief Get version and extended version from VERSION partition string.