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: I014bacc34b5a3a7a2a6de6a29b81a3b147eb6ed9
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/src/entity_manager.cpp b/src/entity_manager.cpp
index db1dfb8..6a4580d 100644
--- a/src/entity_manager.cpp
+++ b/src/entity_manager.cpp
@@ -198,7 +198,7 @@
return -1;
}
return 1;
- });
+ });
}
}
@@ -231,7 +231,7 @@
return -1;
}
return 1;
- });
+ });
}
void createDeleteObjectMethod(
@@ -466,7 +466,7 @@
std::visit(
[&newJson](auto&& val) {
newJson = std::forward<decltype(val)>(val);
- },
+ },
item.second);
}
@@ -558,7 +558,7 @@
jsonPointerPath + "/Exposes/" + std::to_string(lastIndex),
interface, newData, objServer,
sdbusplus::asio::PropertyPermission::readWrite);
- });
+ });
iface->initialize();
}
@@ -1113,7 +1113,7 @@
count, std::ref(timer),
std::ref(systemConfiguration),
newConfiguration, std::ref(objServer)));
- });
+ });
perfScan->run();
});
}
@@ -1263,7 +1263,7 @@
}
propertiesChangedCallback(systemConfiguration, objServer);
- });
+ });
// We also need a poke from DBus when new interfaces are created or
// destroyed.
sdbusplus::bus::match_t interfacesAddedMatch(
@@ -1274,7 +1274,7 @@
{
propertiesChangedCallback(systemConfiguration, objServer);
}
- });
+ });
sdbusplus::bus::match_t interfacesRemovedMatch(
static_cast<sdbusplus::bus_t&>(*systemBus),
sdbusplus::bus::match::rules::interfacesRemoved(),
@@ -1283,7 +1283,7 @@
{
propertiesChangedCallback(systemConfiguration, objServer);
}
- });
+ });
boost::asio::post(io, [&]() {
propertiesChangedCallback(systemConfiguration, objServer);
diff --git a/src/fru_device.cpp b/src/fru_device.cpp
index 6644d93..60ab7ef 100644
--- a/src/fru_device.cpp
+++ b/src/fru_device.cpp
@@ -817,7 +817,7 @@
}
}
return 1;
- });
+ });
}
else if (!iface->register_property(key, property.second + '\0'))
{
@@ -1026,7 +1026,7 @@
unknownBusObjectCount, powerIsOn, objServer,
systemBus);
}
- });
+ });
scan->run();
}
@@ -1079,34 +1079,34 @@
auto scan = std::make_shared<FindDevicesWithCallback>(
i2cBuses, busmap, powerIsOn, objServer, [&]() {
- for (auto& busIface : dbusInterfaceMap)
- {
- objServer.remove_interface(busIface.second);
- }
+ for (auto& busIface : dbusInterfaceMap)
+ {
+ objServer.remove_interface(busIface.second);
+ }
- dbusInterfaceMap.clear();
- unknownBusObjectCount = 0;
+ dbusInterfaceMap.clear();
+ unknownBusObjectCount = 0;
- // todo, get this from a more sensable place
- std::vector<uint8_t> baseboardFRU;
- if (readBaseboardFRU(baseboardFRU))
+ // todo, get this from a more sensable place
+ std::vector<uint8_t> baseboardFRU;
+ if (readBaseboardFRU(baseboardFRU))
+ {
+ // If no device on i2c bus 0, the insertion will happen.
+ auto bus0 = busmap.try_emplace(0,
+ std::make_shared<DeviceMap>());
+ bus0.first->second->emplace(0, baseboardFRU);
+ }
+ for (auto& devicemap : busmap)
+ {
+ for (auto& device : *devicemap.second)
{
- // If no device on i2c bus 0, the insertion will happen.
- auto bus0 =
- busmap.try_emplace(0, std::make_shared<DeviceMap>());
- bus0.first->second->emplace(0, baseboardFRU);
+ addFruObjectToDbus(device.second, dbusInterfaceMap,
+ devicemap.first, device.first,
+ unknownBusObjectCount, powerIsOn,
+ objServer, systemBus);
}
- for (auto& devicemap : busmap)
- {
- for (auto& device : *devicemap.second)
- {
- addFruObjectToDbus(device.second, dbusInterfaceMap,
- devicemap.first, device.first,
- unknownBusObjectCount, powerIsOn,
- objServer, systemBus);
- }
- }
- });
+ }
+ });
scan->run();
});
}
@@ -1387,9 +1387,8 @@
// monitor for new i2c devices
boost::asio::posix::stream_descriptor dirWatch(io, fd);
std::function<void(const boost::system::error_code, std::size_t)>
- watchI2cBusses =
- [&](const boost::system::error_code& ec,
- std::size_t bytesTransferred) {
+ watchI2cBusses = [&](const boost::system::error_code& ec,
+ std::size_t bytesTransferred) {
if (ec)
{
std::cout << "Callback Error " << ec << "\n";
diff --git a/src/fru_utils.cpp b/src/fru_utils.cpp
index efae675..ee04ecb 100644
--- a/src/fru_utils.cpp
+++ b/src/fru_utils.cpp
@@ -522,8 +522,9 @@
{
// Strip non null characters from the end
value.erase(std::find_if(value.rbegin(), value.rend(),
- [](char ch) { return ch != 0; })
- .base(),
+ [](char ch) {
+ return ch != 0;
+ }).base(),
value.end());
result[name] = std::move(value);
diff --git a/src/perform_scan.cpp b/src/perform_scan.cpp
index 2be6477..5e5b715 100644
--- a/src/perform_scan.cpp
+++ b/src/perform_scan.cpp
@@ -76,7 +76,7 @@
}
scan->dbusProbeObjects[instance.path][instance.interface] = resp;
- },
+ },
instance.busName, instance.path, "org.freedesktop.DBus.Properties",
"GetAll", instance.interface);
@@ -191,7 +191,7 @@
}
processDbusObjects(probeVector, scan, interfaceSubtree);
- },
+ },
"xyz.openbmc_project.ObjectMapper",
"/xyz/openbmc_project/object_mapper",
"xyz.openbmc_project.ObjectMapper", "GetSubTree", "/", maxMapperDepth,
diff --git a/src/utils.cpp b/src/utils.cpp
index 8fbbcd1..c0b3d20 100644
--- a/src/utils.cpp
+++ b/src/utils.cpp
@@ -166,7 +166,7 @@
powerStatusOn = boost::ends_with(
std::get<std::string>(findState->second), "Running");
}
- });
+ });
conn->async_method_call(
[](boost::system::error_code ec,
@@ -177,7 +177,7 @@
}
powerStatusOn = boost::ends_with(std::get<std::string>(state),
"Running");
- },
+ },
power::busname, power::path, properties::interface, properties::get,
power::interface, power::property);
}