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: I362352dcb341658501899267c2ff3ad044ed5912
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/subprojects/bare-metal-host-monitor/host_gpio_monitor.cpp b/subprojects/bare-metal-host-monitor/host_gpio_monitor.cpp
index 36a0ec3..0c9f697 100644
--- a/subprojects/bare-metal-host-monitor/host_gpio_monitor.cpp
+++ b/subprojects/bare-metal-host-monitor/host_gpio_monitor.cpp
@@ -42,24 +42,25 @@
OperatingSystemStatusInterface, OperatingSystemStateProperty,
[&, state, action](const boost::system::error_code& ec,
const std::string& postCompleteState) {
- if (ec)
- {
- lg2::error("Error when checking Post Complete GPIO state");
- return;
- }
+ if (ec)
+ {
+ lg2::error("Error when checking Post Complete GPIO state");
+ return;
+ }
- lg2::info("Post Complete state is {STATE}", "STATE", postCompleteState);
+ lg2::info("Post Complete state is {STATE}", "STATE",
+ postCompleteState);
- /*
- * If state is Standby, enable the bare-metal-active systemd
- * target.
- * If state is Inactive, no-op cause IPMI is enabled by default.
- */
- if (postCompleteState == state)
- {
- setUnitStatus(bus, action);
- }
- });
+ /*
+ * If state is Standby, enable the bare-metal-active systemd
+ * target.
+ * If state is Inactive, no-op cause IPMI is enabled by default.
+ */
+ if (postCompleteState == state)
+ {
+ setUnitStatus(bus, action);
+ }
+ });
}
/* This only gets called once on startup. */
@@ -96,39 +97,40 @@
"/xyz/openbmc_project/state/os',arg0namespace='{}'",
OperatingSystemStatusInterface),
[&](sdbusplus::message_t& message) {
- if (message.is_method_error())
- {
- lg2::error("eventHandler callback method error");
- return;
- }
-
- /*
- * This implicitly cancels the timer, if it's already pending.
- * If there's a burst of events within a short period, we want
- * to handle them all at once. So, we will wait this long for no
- * more events to occur, before processing them.
- */
- filterTimer.expires_from_now(std::chrono::seconds(1));
-
- filterTimer.async_wait([&](const boost::system::error_code& ec) {
- if (ec == boost::asio::error::operation_aborted)
+ if (message.is_method_error())
{
- /* we were canceled */
- return;
- }
- if (ec)
- {
- lg2::error("timer error");
+ lg2::error("eventHandler callback method error");
return;
}
/*
- * Stop the bare metal active target if the post complete got
- * deasserted.
+ * This implicitly cancels the timer, if it's already pending.
+ * If there's a burst of events within a short period, we want
+ * to handle them all at once. So, we will wait this long for no
+ * more events to occur, before processing them.
*/
- checkPostCompleteEvent(conn);
+ filterTimer.expires_from_now(std::chrono::seconds(1));
+
+ filterTimer.async_wait(
+ [&](const boost::system::error_code& ec) {
+ if (ec == boost::asio::error::operation_aborted)
+ {
+ /* we were canceled */
+ return;
+ }
+ if (ec)
+ {
+ lg2::error("timer error");
+ return;
+ }
+
+ /*
+ * Stop the bare metal active target if the post
+ * complete got deasserted.
+ */
+ checkPostCompleteEvent(conn);
+ });
});
- });
io.run();
return 0;