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/firmware-update.cpp b/src/firmware-update.cpp
index 05b6576..82364d3 100644
--- a/src/firmware-update.cpp
+++ b/src/firmware-update.cpp
@@ -212,8 +212,7 @@
check = HashCheck::requested;
}
- ~TransferHashCheck()
- {}
+ ~TransferHashCheck() {}
bool hash(const std::vector<uint8_t>& data)
{
@@ -381,29 +380,29 @@
sdbusplus::bus::match::rules::propertiesChanged(
objPath, "xyz.openbmc_project.Software.ActivationProgress"),
[&](sdbusplus::message_t& msg) {
- std::map<std::string, ipmi::DbusVariant> props;
- std::vector<std::string> inVal;
- std::string iface;
- try
- {
- msg.read(iface, props, inVal);
- }
- catch (const std::exception& e)
- {
- phosphor::logging::log<phosphor::logging::level::ERR>(
- "Exception caught in get ActivationProgress");
- return;
- }
+ std::map<std::string, ipmi::DbusVariant> props;
+ std::vector<std::string> inVal;
+ std::string iface;
+ try
+ {
+ msg.read(iface, props, inVal);
+ }
+ catch (const std::exception& e)
+ {
+ phosphor::logging::log<phosphor::logging::level::ERR>(
+ "Exception caught in get ActivationProgress");
+ return;
+ }
- auto it = props.find("Progress");
- if (it != props.end())
+ auto it = props.find("Progress");
+ if (it != props.end())
+ {
+ progressPercent = std::get<uint8_t>(it->second);
+ if (progressPercent == 100)
{
- progressPercent = std::get<uint8_t>(it->second);
- if (progressPercent == 100)
- {
- fwUpdateState = fwStateUpdateSuccess;
- }
+ fwUpdateState = fwStateUpdateSuccess;
}
+ }
});
}
uint8_t activationTimerTimeout()
@@ -466,12 +465,12 @@
std::shared_ptr<sdbusplus::asio::connection> bus = getSdBus();
bus->async_method_call(
[](const boost::system::error_code ec) {
- if (ec)
- {
- phosphor::logging::log<phosphor::logging::level::ERR>(
- "async_method_call error: activateImage failed");
- return;
- }
+ if (ec)
+ {
+ phosphor::logging::log<phosphor::logging::level::ERR>(
+ "async_method_call error: activateImage failed");
+ return;
+ }
},
"xyz.openbmc_project.Software.BMC.Updater", objPath,
"org.freedesktop.DBus.Properties", "Set",
@@ -510,7 +509,6 @@
static void setFirmwareUpdateMode(const bool mode)
{
-
std::string bmcState(bmcStateReady);
if (mode)
{
@@ -1064,7 +1062,7 @@
* - count - channel count
* - channelList - channel list information
*/
-ipmi::RspType<uint8_t, // channel count
+ipmi::RspType<uint8_t, // channel count
std::array<std::tuple<uint8_t, uint32_t>,
channelListSize> // Channel List
>
@@ -1671,8 +1669,8 @@
static void registerFirmwareFunctions()
{
// guarantee that we start with an already timed out timestamp
- fwRandomNumGenTs =
- std::chrono::steady_clock::now() - fwRandomNumExpirySeconds;
+ fwRandomNumGenTs = std::chrono::steady_clock::now() -
+ fwRandomNumExpirySeconds;
fwUpdateStatus.setState(
static_cast<uint8_t>(FwUpdateStatusCache::fwStateInit));