clang-format: copy latest and re-format
clang-format-17 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: Ie6154ef3394b8e652a8cb1ac33d68e3c3cec8cd8
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/tools/helper.cpp b/tools/helper.cpp
index 15c363f..f419410 100644
--- a/tools/helper.cpp
+++ b/tools/helper.cpp
@@ -92,25 +92,24 @@
{
pollStat(session, blob,
[](const ipmiblob::StatResponse& resp) -> std::optional<bool> {
- if (resp.metadata.size() != 1)
- {
- throw ToolException("Invalid stat metadata");
- }
- auto result =
- static_cast<ipmi_flash::ActionStatus>(resp.metadata[0]);
- switch (result)
- {
- case ipmi_flash::ActionStatus::failed:
- throw ToolException("BMC reported failure");
- case ipmi_flash::ActionStatus::unknown:
- case ipmi_flash::ActionStatus::running:
- return std::nullopt;
- case ipmi_flash::ActionStatus::success:
- return true;
- default:
- throw ToolException("Unrecognized action status");
- }
- });
+ if (resp.metadata.size() != 1)
+ {
+ throw ToolException("Invalid stat metadata");
+ }
+ auto result = static_cast<ipmi_flash::ActionStatus>(resp.metadata[0]);
+ switch (result)
+ {
+ case ipmi_flash::ActionStatus::failed:
+ throw ToolException("BMC reported failure");
+ case ipmi_flash::ActionStatus::unknown:
+ case ipmi_flash::ActionStatus::running:
+ return std::nullopt;
+ case ipmi_flash::ActionStatus::success:
+ return true;
+ default:
+ throw ToolException("Unrecognized action status");
+ }
+ });
}
/* Poll an open blob session for reading.
@@ -132,16 +131,16 @@
return pollStat(
session, blob,
[](const ipmiblob::StatResponse& resp) -> std::optional<uint32_t> {
- if (resp.blob_state & ipmiblob::StateFlags::open_read)
- {
- return resp.size;
- }
- if (resp.blob_state & ipmiblob::StateFlags::committing)
- {
- return std::nullopt;
- }
- throw ToolException("BMC blob failed to become ready");
- });
+ if (resp.blob_state & ipmiblob::StateFlags::open_read)
+ {
+ return resp.size;
+ }
+ if (resp.blob_state & ipmiblob::StateFlags::committing)
+ {
+ return std::nullopt;
+ }
+ throw ToolException("BMC blob failed to become ready");
+ });
}
void* memcpyAligned(void* destination, const void* source, std::size_t size)