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: I917f3a65c985f3df3bb4d7a1bef0a13da54ab7bd
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/vpd-manager/bios_handler.cpp b/vpd-manager/bios_handler.cpp
index f8c6d73..14e1095 100644
--- a/vpd-manager/bios_handler.cpp
+++ b/vpd-manager/bios_handler.cpp
@@ -34,23 +34,24 @@
sdbusplus::bus::match::rules::nameOwnerChanged(
"xyz.openbmc_project.PLDM"),
[this](sdbusplus::message_t& msg) {
- if (msg.is_method_error())
- {
- std::cerr << "Error in reading name owner signal " << std::endl;
- return;
- }
- std::string name;
- std::string newOwner;
- std::string oldOwner;
+ if (msg.is_method_error())
+ {
+ std::cerr
+ << "Error in reading name owner signal " << std::endl;
+ return;
+ }
+ std::string name;
+ std::string newOwner;
+ std::string oldOwner;
- msg.read(name, oldOwner, newOwner);
- if (newOwner != "" && name == "xyz.openbmc_project.PLDM")
- {
- this->restoreBIOSAttribs();
- // We don't need the match anymore
- nameOwnerMatch.reset();
- }
- });
+ msg.read(name, oldOwner, newOwner);
+ if (newOwner != "" && name == "xyz.openbmc_project.PLDM")
+ {
+ this->restoreBIOSAttribs();
+ // We don't need the match anymore
+ nameOwnerMatch.reset();
+ }
+ });
// Check if PLDM is already running, if it is, we can go ahead and attempt
// to sync BIOS attributes (since PLDM would have initialized them by the
// time it acquires a bus name).
@@ -550,8 +551,8 @@
}
// Need to write?
- std::string toWrite = (createDefaultLpar.at(0) & 0x02) ? "Enabled"
- : "Disabled";
+ std::string toWrite =
+ (createDefaultLpar.at(0) & 0x02) ? "Enabled" : "Disabled";
if (createDefaultLparInBIOS == toWrite)
{
std::cout << "Skip Create default LPAR BIOS write, value is already: "
@@ -623,8 +624,8 @@
// VPD keywords with data taken from the BIOS.
auto fcoInVPD = readBusProperty(SYSTEM_OBJECT, "com.ibm.ipzvpd.VSYS", "RG");
auto ammInVPD = readBusProperty(SYSTEM_OBJECT, "com.ibm.ipzvpd.UTIL", "D0");
- auto keepAndClearInVPD = readBusProperty(SYSTEM_OBJECT,
- "com.ibm.ipzvpd.UTIL", "D1");
+ auto keepAndClearInVPD =
+ readBusProperty(SYSTEM_OBJECT, "com.ibm.ipzvpd.UTIL", "D1");
auto fcoInBIOS = readBIOSFCO();
auto ammInBIOS = readBIOSAMM();
auto keepAndClearInBIOS = readBIOSKeepAndClear();
@@ -655,13 +656,13 @@
saveKeepAndClearToBIOS(keepAndClearInVPD, keepAndClearInBIOS);
// Have to read D1 again because two attributes are stored in the same
// keyword.
- auto createDefaultLparInVPD = readBusProperty(SYSTEM_OBJECT,
- "com.ibm.ipzvpd.UTIL", "D1");
+ auto createDefaultLparInVPD =
+ readBusProperty(SYSTEM_OBJECT, "com.ibm.ipzvpd.UTIL", "D1");
saveCreateDefaultLparToBIOS(createDefaultLparInVPD,
createDefaultLparInBIOS);
- auto clearNVRAMInVPD = readBusProperty(SYSTEM_OBJECT, "com.ibm.ipzvpd.UTIL",
- "D1");
+ auto clearNVRAMInVPD =
+ readBusProperty(SYSTEM_OBJECT, "com.ibm.ipzvpd.UTIL", "D1");
saveClearNVRAMToBIOS(clearNVRAMInVPD, clearNVRAMInBIOS);
// Start listener now that we have done the restore