clang-format-11: reformat
The .clang-format file here is an old version of the common one.
Upgrade to the latest and reformat.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I0d532aa88d650e9c7664e07abfc8c4fdf0dd3df4
diff --git a/phosphor-ldap-config/ldap_config.cpp b/phosphor-ldap-config/ldap_config.cpp
index b602e88..bd3c97f 100644
--- a/phosphor-ldap-config/ldap_config.cpp
+++ b/phosphor-ldap-config/ldap_config.cpp
@@ -1,14 +1,15 @@
-#include "ldap_config_mgr.hpp"
#include "ldap_config.hpp"
+
+#include "ldap_config_mgr.hpp"
+#include "ldap_mapper_serialize.hpp"
#include "utils.hpp"
+#include <cereal/archives/binary.hpp>
#include <cereal/types/string.hpp>
#include <cereal/types/vector.hpp>
-#include <cereal/archives/binary.hpp>
-#include "ldap_mapper_serialize.hpp"
-
#include <xyz/openbmc_project/Common/error.hpp>
#include <xyz/openbmc_project/User/Common/error.hpp>
+
#include <filesystem>
#include <fstream>
#include <sstream>
diff --git a/phosphor-ldap-config/ldap_config.hpp b/phosphor-ldap-config/ldap_config.hpp
index 4ebba38..e68f434 100644
--- a/phosphor-ldap-config/ldap_config.hpp
+++ b/phosphor-ldap-config/ldap_config.hpp
@@ -1,17 +1,19 @@
#pragma once
#include "config.h"
-#include <xyz/openbmc_project/Object/Enable/server.hpp>
-#include <xyz/openbmc_project/User/Ldap/Create/server.hpp>
-#include <xyz/openbmc_project/User/Ldap/Config/server.hpp>
-#include <xyz/openbmc_project/User/PrivilegeMapper/server.hpp>
-#include <xyz/openbmc_project/Common/error.hpp>
+
#include "ldap_mapper_entry.hpp"
-#include <phosphor-logging/log.hpp>
-#include <phosphor-logging/elog.hpp>
+
#include <phosphor-logging/elog-errors.hpp>
+#include <phosphor-logging/elog.hpp>
+#include <phosphor-logging/log.hpp>
#include <sdbusplus/bus.hpp>
#include <sdbusplus/server/object.hpp>
+#include <xyz/openbmc_project/Common/error.hpp>
+#include <xyz/openbmc_project/Object/Enable/server.hpp>
+#include <xyz/openbmc_project/User/Ldap/Config/server.hpp>
+#include <xyz/openbmc_project/User/Ldap/Create/server.hpp>
+#include <xyz/openbmc_project/User/PrivilegeMapper/server.hpp>
#include <filesystem>
#include <set>
diff --git a/phosphor-ldap-config/ldap_config_mgr.cpp b/phosphor-ldap-config/ldap_config_mgr.cpp
index bf42107..3021793 100644
--- a/phosphor-ldap-config/ldap_config_mgr.cpp
+++ b/phosphor-ldap-config/ldap_config_mgr.cpp
@@ -1,7 +1,8 @@
#include "ldap_config_mgr.hpp"
-#include "ldap_config.hpp"
+#include "ldap_config.hpp"
#include "utils.hpp"
+
#include <filesystem>
#include <fstream>
#include <sstream>
diff --git a/phosphor-ldap-config/ldap_config_mgr.hpp b/phosphor-ldap-config/ldap_config_mgr.hpp
index 7186503..f623783 100644
--- a/phosphor-ldap-config/ldap_config_mgr.hpp
+++ b/phosphor-ldap-config/ldap_config_mgr.hpp
@@ -1,15 +1,17 @@
#pragma once
+#include "config.h"
+
#include "ldap_config.hpp"
-#include "config.h"
+#include <phosphor-logging/elog-errors.hpp>
+#include <phosphor-logging/elog.hpp>
+#include <phosphor-logging/log.hpp>
+#include <sdbusplus/bus.hpp>
+#include <xyz/openbmc_project/Common/error.hpp>
#include <xyz/openbmc_project/User/Ldap/Config/server.hpp>
#include <xyz/openbmc_project/User/Ldap/Create/server.hpp>
-#include <xyz/openbmc_project/Common/error.hpp>
-#include <phosphor-logging/log.hpp>
-#include <phosphor-logging/elog.hpp>
-#include <phosphor-logging/elog-errors.hpp>
-#include <sdbusplus/bus.hpp>
+
#include <string>
namespace phosphor
{
@@ -57,8 +59,7 @@
CreateIface(bus, path, true),
dbusPersistentPath(dbusPersistentPath), configFilePath(filePath),
tlsCacertFile(caCertFile), tlsCertFile(certFile), bus(bus)
- {
- }
+ {}
/** @brief concrete implementation of the pure virtual funtion
xyz.openbmc_project.User.Ldap.Create.createConfig.
diff --git a/phosphor-ldap-config/ldap_mapper_entry.cpp b/phosphor-ldap-config/ldap_mapper_entry.cpp
index 09b0e0f..eb4a4f2 100644
--- a/phosphor-ldap-config/ldap_mapper_entry.cpp
+++ b/phosphor-ldap-config/ldap_mapper_entry.cpp
@@ -1,13 +1,17 @@
-#include <filesystem>
+#include "config.h"
+
+#include "ldap_mapper_entry.hpp"
+
+#include "ldap_config.hpp"
+#include "ldap_mapper_serialize.hpp"
+
+#include <phosphor-logging/elog-errors.hpp>
+#include <phosphor-logging/elog.hpp>
+#include <phosphor-logging/log.hpp>
#include <xyz/openbmc_project/Common/error.hpp>
#include <xyz/openbmc_project/User/Common/error.hpp>
-#include <phosphor-logging/log.hpp>
-#include <phosphor-logging/elog.hpp>
-#include <phosphor-logging/elog-errors.hpp>
-#include "config.h"
-#include "ldap_config.hpp"
-#include "ldap_mapper_entry.hpp"
-#include "ldap_mapper_serialize.hpp"
+
+#include <filesystem>
namespace phosphor
{
@@ -19,10 +23,10 @@
sdbusplus::xyz::openbmc_project::Common::Error::InvalidArgument;
using Argument = xyz::openbmc_project::Common::InvalidArgument;
-LDAPMapperEntry::LDAPMapperEntry(sdbusplus::bus::bus &bus, const char *path,
- const char *filePath,
- const std::string &groupName,
- const std::string &privilege, Config &parent) :
+LDAPMapperEntry::LDAPMapperEntry(sdbusplus::bus::bus& bus, const char* path,
+ const char* filePath,
+ const std::string& groupName,
+ const std::string& privilege, Config& parent) :
Interfaces(bus, path, true),
id(std::stol(std::filesystem::path(path).filename())), manager(parent),
persistPath(filePath)
@@ -32,13 +36,12 @@
Interfaces::emit_object_added();
}
-LDAPMapperEntry::LDAPMapperEntry(sdbusplus::bus::bus &bus, const char *path,
- const char *filePath, Config &parent) :
+LDAPMapperEntry::LDAPMapperEntry(sdbusplus::bus::bus& bus, const char* path,
+ const char* filePath, Config& parent) :
Interfaces(bus, path, true),
id(std::stol(std::filesystem::path(path).filename())), manager(parent),
persistPath(filePath)
-{
-}
+{}
void LDAPMapperEntry::delete_(void)
{
diff --git a/phosphor-ldap-config/ldap_mapper_entry.hpp b/phosphor-ldap-config/ldap_mapper_entry.hpp
index 310f006..efafeae 100644
--- a/phosphor-ldap-config/ldap_mapper_entry.hpp
+++ b/phosphor-ldap-config/ldap_mapper_entry.hpp
@@ -2,8 +2,8 @@
#include <sdbusplus/bus.hpp>
#include <sdbusplus/server/object.hpp>
-#include <xyz/openbmc_project/User/PrivilegeMapperEntry/server.hpp>
#include <xyz/openbmc_project/Object/Delete/server.hpp>
+#include <xyz/openbmc_project/User/PrivilegeMapperEntry/server.hpp>
namespace phosphor
{
@@ -30,10 +30,10 @@
public:
LDAPMapperEntry() = delete;
~LDAPMapperEntry() = default;
- LDAPMapperEntry(const LDAPMapperEntry &) = delete;
- LDAPMapperEntry &operator=(const LDAPMapperEntry &) = delete;
- LDAPMapperEntry(LDAPMapperEntry &&) = default;
- LDAPMapperEntry &operator=(LDAPMapperEntry &&) = default;
+ LDAPMapperEntry(const LDAPMapperEntry&) = delete;
+ LDAPMapperEntry& operator=(const LDAPMapperEntry&) = delete;
+ LDAPMapperEntry(LDAPMapperEntry&&) = default;
+ LDAPMapperEntry& operator=(LDAPMapperEntry&&) = default;
/** @brief Constructs LDAP privilege mapper entry object.
*
@@ -44,9 +44,9 @@
* @param[in] privilege - the privilege for the group
* @param[in] parent - LDAP privilege mapper manager
*/
- LDAPMapperEntry(sdbusplus::bus::bus &bus, const char *path,
- const char *filePath, const std::string &groupName,
- const std::string &privilege, Config &parent);
+ LDAPMapperEntry(sdbusplus::bus::bus& bus, const char* path,
+ const char* filePath, const std::string& groupName,
+ const std::string& privilege, Config& parent);
/** @brief Constructs LDAP privilege mapper entry object
*
@@ -55,8 +55,8 @@
* @param[in] filePath - serialization directory path
* @param[in] parent - LDAP privilege mapper manager
*/
- LDAPMapperEntry(sdbusplus::bus::bus &bus, const char *path,
- const char *filePath, Config &parent);
+ LDAPMapperEntry(sdbusplus::bus::bus& bus, const char* path,
+ const char* filePath, Config& parent);
/** @brief Delete privilege mapper entry object
*
@@ -88,7 +88,7 @@
private:
Id id;
- Config &manager;
+ Config& manager;
/** @brief serialization directory path */
std::string persistPath;
diff --git a/phosphor-ldap-config/ldap_mapper_serialize.cpp b/phosphor-ldap-config/ldap_mapper_serialize.cpp
index 7fe2398..e8e56d4 100644
--- a/phosphor-ldap-config/ldap_mapper_serialize.cpp
+++ b/phosphor-ldap-config/ldap_mapper_serialize.cpp
@@ -1,9 +1,12 @@
+#include "config.h"
+
+#include "ldap_mapper_serialize.hpp"
+
#include <cereal/archives/binary.hpp>
#include <cereal/types/string.hpp>
-#include <fstream>
#include <phosphor-logging/log.hpp>
-#include "config.h"
-#include "ldap_mapper_serialize.hpp"
+
+#include <fstream>
// Register class version
// From cereal documentation;
diff --git a/phosphor-ldap-config/ldap_mapper_serialize.hpp b/phosphor-ldap-config/ldap_mapper_serialize.hpp
index 371a556..bc6cdd8 100644
--- a/phosphor-ldap-config/ldap_mapper_serialize.hpp
+++ b/phosphor-ldap-config/ldap_mapper_serialize.hpp
@@ -1,9 +1,11 @@
#pragma once
-#include <filesystem>
#include "config.h"
+
#include "ldap_mapper_entry.hpp"
+#include <filesystem>
+
namespace phosphor
{
namespace ldap
diff --git a/phosphor-ldap-config/main.cpp b/phosphor-ldap-config/main.cpp
index 4238086..041609b 100644
--- a/phosphor-ldap-config/main.cpp
+++ b/phosphor-ldap-config/main.cpp
@@ -1,11 +1,14 @@
#include "config.h"
+
#include "ldap_config_mgr.hpp"
-#include <filesystem>
-#include <phosphor-logging/log.hpp>
+
#include <phosphor-logging/elog-errors.hpp>
+#include <phosphor-logging/log.hpp>
#include <sdbusplus/bus.hpp>
#include <xyz/openbmc_project/Common/error.hpp>
+#include <filesystem>
+
int main(int argc, char* argv[])
{
using namespace phosphor::logging;
diff --git a/phosphor-ldap-config/utils.cpp b/phosphor-ldap-config/utils.cpp
index 7a40a3e..8a8b86f 100644
--- a/phosphor-ldap-config/utils.cpp
+++ b/phosphor-ldap-config/utils.cpp
@@ -1,8 +1,10 @@
#include "utils.hpp"
-#include <cstring>
-#include <netdb.h>
+
#include <arpa/inet.h>
#include <ldap.h>
+#include <netdb.h>
+
+#include <cstring>
#include <memory>
namespace phosphor