reformat for clang-format-18
Google-Bug-Id: 375055000
Change-Id: Icd67496b6d0d38b291ce7cf1e61ab9299eddc098
Signed-off-by: Willy Tu <wltu@google.com>
diff --git a/src/bmc_monitor_app.cpp b/src/bmc_monitor_app.cpp
index 9213ce4..25f2c9b 100644
--- a/src/bmc_monitor_app.cpp
+++ b/src/bmc_monitor_app.cpp
@@ -56,8 +56,7 @@
BMCMonitorApp::BMCMonitorApp(
sdbusplus::bus::bus& bus,
std::shared_ptr<sdbusplus::asio::connection> conn) :
- objManager(bus, kObjPath.data()),
- util(std::make_shared<Util>()),
+ objManager(bus, kObjPath.data()), util(std::make_shared<Util>()),
cpCSV(std::make_shared<FileUtil>(util->getCPPath(kNodeName, false))),
durCSV(std::make_shared<FileUtil>(util->getDurPath(kNodeName, false))),
bootManager(std::make_shared<BootManager>(util, cpCSV, durCSV)),
diff --git a/src/boot_manager.cpp b/src/boot_manager.cpp
index 4a726b5..4ead565 100644
--- a/src/boot_manager.cpp
+++ b/src/boot_manager.cpp
@@ -22,8 +22,7 @@
BootManager::BootManager(std::shared_ptr<UtilIface> util,
const std::shared_ptr<FileUtilIface>& cpCSV,
const std::shared_ptr<FileUtilIface>& durCSV) :
- util(std::move(util)),
- cpCSV(cpCSV), durCSV(durCSV)
+ util(std::move(util)), cpCSV(cpCSV), durCSV(durCSV)
{
checkpoints = std::move(*cpCSV->loadCheckpoints(false));
durations = std::move(*durCSV->loadDurations(false));
@@ -68,9 +67,9 @@
// calculate transition time for me".
if (duration != 0)
{
- checkpoints.emplace_back(
- cpName.data() + std::string{kBeginStageSuffix},
- wallTime - duration, upTime.value() - duration);
+ checkpoints.emplace_back(cpName.data() + std::string{kBeginStageSuffix},
+ wallTime - duration,
+ upTime.value() - duration);
cpCSV->addCheckpoint(checkpoints.back().name,
checkpoints.back().wallTime,
checkpoints.back().monoTime);
diff --git a/src/host_monitor_app.cpp b/src/host_monitor_app.cpp
index 07c3ac0..05db6b0 100644
--- a/src/host_monitor_app.cpp
+++ b/src/host_monitor_app.cpp
@@ -41,14 +41,16 @@
"xyz.openbmc_project.State.OperatingSystem.Status";
constexpr std::string_view kOSStatusProperty = "OperatingSystemState";
-std::string inline translateHostStateName(std::string_view state) {
+std::string inline translateHostStateName(std::string_view state)
+{
std::size_t found = state.find_last_of('.');
- return std::string("HostState:") + std::string(state.substr(found+1));
+ return std::string("HostState:") + std::string(state.substr(found + 1));
}
-std::string inline translateOSStatus(std::string_view status) {
+std::string inline translateOSStatus(std::string_view status)
+{
std::size_t found = status.find_last_of('.');
- return std::string("OSStatus:") + std::string(status.substr(found+1));
+ return std::string("OSStatus:") + std::string(status.substr(found + 1));
}
HostMonitorApp::HostMonitorApp(sdbusplus::bus::bus& bus, uint32_t hostNum) :
@@ -88,7 +90,6 @@
sdbusplus::bus::match::rules::propertiesChanged(kHostPath.data(),
kHostIface.data()),
[this](sdbusplus::message::message& message) {
-
std::string objectName;
boost::container::flat_map<
std::string,
@@ -105,10 +106,11 @@
stderr,
"[hostStateWatcher] CurrentHostState has changed from {} to {}\n",
preHostState, curHostState);
- bootManager->setCheckpoint(translateHostStateName(curHostState), 0, 0);
+ bootManager->setCheckpoint(translateHostStateName(curHostState), 0,
+ 0);
preHostState = curHostState;
}
- });
+ });
// Initialize preOSStatus
static std::string preOSStatus;
@@ -136,7 +138,6 @@
sdbusplus::bus::match::rules::propertiesChanged(kOSStatusPath.data(),
kOSStatusIface.data()),
[this](sdbusplus::message::message& message) {
-
std::string objectName;
boost::container::flat_map<
std::string,
diff --git a/test/boot_manager_test.cpp b/test/boot_manager_test.cpp
index 30fe1a6..bcbfd32 100644
--- a/test/boot_manager_test.cpp
+++ b/test/boot_manager_test.cpp
@@ -121,7 +121,7 @@
{
EXPECT_EQ(cps[count].name,
name.data() +
- std::string{BootManager::kBeginStageSuffix});
+ std::string{BootManager::kBeginStageSuffix});
EXPECT_EQ(cps[count].wallTime, 1000 * (i + 1) - duration);
EXPECT_EQ(cps[count].monoTime, 10000 + 1000 * i - duration);
count++;
diff --git a/yaml/xyz/openbmc_project/Time/Boot/Checkpoint.interface.yaml b/yaml/xyz/openbmc_project/Time/Boot/Checkpoint.interface.yaml
index a84bfe0..27e8314 100644
--- a/yaml/xyz/openbmc_project/Time/Boot/Checkpoint.interface.yaml
+++ b/yaml/xyz/openbmc_project/Time/Boot/Checkpoint.interface.yaml
@@ -4,32 +4,33 @@
methods:
- name: SetCheckpoint
description: >
- Labeling this moment as a checkpoint for a specific stage.
+ Labeling this moment as a checkpoint for a specific stage.
parameters:
- - name: CheckpointName
- type: string
- default: ""
- description: >
- Checkpoint name for this moment.
- - name: WallTime
- type: int64
- default: 0
- description: >
- Seconds that has elapsed since Jan 1st 1970 00:00:00 (Epoch).
- If this value is 0, then BMC will fetch wall time internally
- instead.
- - name: SelfMeasuredDuration
- type: int64
- default: 0
- description: >
- Duration in second that is measured by the sender itself.
- If this parameter is set (non zero), then BMC will help to calculate
- the transition time from last checkpoint to current stage.
+ - name: CheckpointName
+ type: string
+ default: ""
+ description: >
+ Checkpoint name for this moment.
+ - name: WallTime
+ type: int64
+ default: 0
+ description: >
+ Seconds that has elapsed since Jan 1st 1970 00:00:00 (Epoch). If
+ this value is 0, then BMC will fetch wall time internally
+ instead.
+ - name: SelfMeasuredDuration
+ type: int64
+ default: 0
+ description: >
+ Duration in second that is measured by the sender itself. If
+ this parameter is set (non zero), then BMC will help to
+ calculate the transition time from last checkpoint to current
+ stage.
errors:
- - xyz.openbmc_project.Common.Error.InvalidArgument
+ - xyz.openbmc_project.Common.Error.InvalidArgument
- name: GetCheckpointList
description: >
- Get the list of checkpoints.
+ Get the list of checkpoints.
returns:
- name: CheckpointList
type: array[struct[string, int64, int64]]
@@ -37,4 +38,4 @@
A list of checkpoints.
- name: RebootComplete
description: >
- Mark current reboot process as completed.
+ Mark current reboot process as completed.
diff --git a/yaml/xyz/openbmc_project/Time/Boot/Duration.interface.yaml b/yaml/xyz/openbmc_project/Time/Boot/Duration.interface.yaml
index 5d34d4f..05339f1 100644
--- a/yaml/xyz/openbmc_project/Time/Boot/Duration.interface.yaml
+++ b/yaml/xyz/openbmc_project/Time/Boot/Duration.interface.yaml
@@ -3,23 +3,23 @@
methods:
- name: SetDuration
description: >
- Store any durations that is related to this reboot.
+ Store any durations that is related to this reboot.
parameters:
- - name: DurationName
- type: string
- default: ""
- description: >
- Duration name for this moment.
- - name: Duration
- type: int64
- default: 0
- description: >
- Duration in second.
+ - name: DurationName
+ type: string
+ default: ""
+ description: >
+ Duration name for this moment.
+ - name: Duration
+ type: int64
+ default: 0
+ description: >
+ Duration in second.
errors:
- - xyz.openbmc_project.Common.Error.InvalidArgument
+ - xyz.openbmc_project.Common.Error.InvalidArgument
- name: GetAdditionalDurations
description: >
- Get all the additional durations.
+ Get all the additional durations.
returns:
- name: durationsList
type: array[struct[string, int64]]
diff --git a/yaml/xyz/openbmc_project/Time/Boot/Statistic.interface.yaml b/yaml/xyz/openbmc_project/Time/Boot/Statistic.interface.yaml
index cb740ea..17b672b 100644
--- a/yaml/xyz/openbmc_project/Time/Boot/Statistic.interface.yaml
+++ b/yaml/xyz/openbmc_project/Time/Boot/Statistic.interface.yaml
@@ -5,6 +5,6 @@
type: boolean
default: false
description: >
- Returns whether this machine is rebooting.
+ Returns whether this machine is rebooting.
flags:
- - readonly
+ - readonly