summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Venture <venture@google.com>2018-09-12 13:27:42 -0700
committerPatrick Venture <venture@google.com>2018-09-25 10:07:22 -0700
commit3a5071a9256ded54366494e161045db73b2d7a92 (patch)
tree82366dd682adb963c8d49fad55893b0050f51500
parentdde78e0301f7e4d2a0c7f63700530bbe96ced51c (diff)
downloadphosphor-host-ipmid-3a5071a9256ded54366494e161045db73b2d7a92.zip
phosphor-host-ipmid-3a5071a9256ded54366494e161045db73b2d7a92.tar.gz
move filesystem inclusion to bottom of list
Change-Id: I4aa3c984992236bb5b4a5c62c3d42a33c12d55de Signed-off-by: Patrick Venture <venture@google.com>
-rw-r--r--apphandler.cpp29
-rw-r--r--chassishandler.cpp29
-rw-r--r--selutility.cpp15
-rw-r--r--sensordatahandler.cpp18
-rw-r--r--storagehandler.cpp35
-rw-r--r--transporthandler.cpp36
6 files changed, 80 insertions, 82 deletions
diff --git a/apphandler.cpp b/apphandler.cpp
index f3a1164..ab5c604 100644
--- a/apphandler.cpp
+++ b/apphandler.cpp
@@ -15,26 +15,12 @@
#include <systemd/sd-bus.h>
#include <unistd.h>
-#include <nlohmann/json.hpp>
-
-#if __has_include(<filesystem>)
-#include <filesystem>
-#elif __has_include(<experimental/filesystem>)
-#include <experimental/filesystem>
-namespace std
-{
-// splice experimental::filesystem into std
-namespace filesystem = std::experimental::filesystem;
-} // namespace std
-#else
-#error filesystem not available
-#endif
-
#include <algorithm>
#include <array>
#include <cstddef>
#include <fstream>
#include <memory>
+#include <nlohmann/json.hpp>
#include <phosphor-logging/elog-errors.hpp>
#include <phosphor-logging/log.hpp>
#include <string>
@@ -45,6 +31,19 @@ namespace filesystem = std::experimental::filesystem;
#include <xyz/openbmc_project/Software/Version/server.hpp>
#include <xyz/openbmc_project/State/BMC/server.hpp>
+#if __has_include(<filesystem>)
+#include <filesystem>
+#elif __has_include(<experimental/filesystem>)
+#include <experimental/filesystem>
+namespace std
+{
+// splice experimental::filesystem into std
+namespace filesystem = std::experimental::filesystem;
+} // namespace std
+#else
+#error filesystem not available
+#endif
+
extern sd_bus* bus;
constexpr auto bmc_state_interface = "xyz.openbmc_project.State.BMC";
diff --git a/chassishandler.cpp b/chassishandler.cpp
index 80f4402..b822212 100644
--- a/chassishandler.cpp
+++ b/chassishandler.cpp
@@ -4,6 +4,7 @@
#include "ipmid.hpp"
#include "settings.hpp"
+#include "timer.hpp"
#include "types.hpp"
#include "utils.hpp"
@@ -18,7 +19,20 @@
#include <chrono>
#include <fstream>
#include <future>
+#include <map>
+#include <phosphor-logging/elog-errors.hpp>
+#include <phosphor-logging/log.hpp>
+#include <sdbusplus/bus.hpp>
+#include <sdbusplus/server/object.hpp>
#include <sstream>
+#include <string>
+#include <xyz/openbmc_project/Common/error.hpp>
+#include <xyz/openbmc_project/Control/Boot/Mode/server.hpp>
+#include <xyz/openbmc_project/Control/Boot/Source/server.hpp>
+#include <xyz/openbmc_project/Control/Power/RestorePolicy/server.hpp>
+#include <xyz/openbmc_project/State/Host/server.hpp>
+#include <xyz/openbmc_project/State/PowerOnHours/server.hpp>
+
#if __has_include(<filesystem>)
#include <filesystem>
#elif __has_include(<experimental/filesystem>)
@@ -32,21 +46,6 @@ namespace filesystem = std::experimental::filesystem;
#error filesystem not available
#endif
-#include "timer.hpp"
-
-#include <map>
-#include <phosphor-logging/elog-errors.hpp>
-#include <phosphor-logging/log.hpp>
-#include <sdbusplus/bus.hpp>
-#include <sdbusplus/server/object.hpp>
-#include <string>
-#include <xyz/openbmc_project/Common/error.hpp>
-#include <xyz/openbmc_project/Control/Boot/Mode/server.hpp>
-#include <xyz/openbmc_project/Control/Boot/Source/server.hpp>
-#include <xyz/openbmc_project/Control/Power/RestorePolicy/server.hpp>
-#include <xyz/openbmc_project/State/Host/server.hpp>
-#include <xyz/openbmc_project/State/PowerOnHours/server.hpp>
-
// Defines
#define SET_PARM_VERSION 0x01
#define SET_PARM_BOOT_FLAGS_PERMANENT 0x40 // boot flags data1 7th bit on
diff --git a/selutility.cpp b/selutility.cpp
index 228bf62..0789be4 100644
--- a/selutility.cpp
+++ b/selutility.cpp
@@ -2,8 +2,15 @@
#include "selutility.hpp"
+#include "types.hpp"
+#include "utils.hpp"
+
+#include <host-ipmid/ipmid-api.h>
+
#include <chrono>
+#include <phosphor-logging/elog-errors.hpp>
#include <vector>
+#include <xyz/openbmc_project/Common/error.hpp>
#if __has_include(<filesystem>)
#include <filesystem>
@@ -18,14 +25,6 @@ namespace filesystem = std::experimental::filesystem;
#error filesystem not available
#endif
-#include "types.hpp"
-#include "utils.hpp"
-
-#include <host-ipmid/ipmid-api.h>
-
-#include <phosphor-logging/elog-errors.hpp>
-#include <xyz/openbmc_project/Common/error.hpp>
-
extern const ipmi::sensor::InvObjectIDMap invSensors;
using namespace phosphor::logging;
using InternalFailure =
diff --git a/sensordatahandler.cpp b/sensordatahandler.cpp
index 27dd011..f5c1e53 100644
--- a/sensordatahandler.cpp
+++ b/sensordatahandler.cpp
@@ -1,4 +1,14 @@
+#include "sensordatahandler.hpp"
+
+#include "sensorhandler.hpp"
+#include "types.hpp"
+#include "utils.hpp"
+
#include <bitset>
+#include <phosphor-logging/elog-errors.hpp>
+#include <phosphor-logging/log.hpp>
+#include <xyz/openbmc_project/Common/error.hpp>
+
#if __has_include(<filesystem>)
#include <filesystem>
#elif __has_include(<experimental/filesystem>)
@@ -11,14 +21,6 @@ namespace filesystem = std::experimental::filesystem;
#else
#error filesystem not available
#endif
-#include "sensordatahandler.hpp"
-#include "sensorhandler.hpp"
-#include "types.hpp"
-#include "utils.hpp"
-
-#include <phosphor-logging/elog-errors.hpp>
-#include <phosphor-logging/log.hpp>
-#include <xyz/openbmc_project/Common/error.hpp>
namespace ipmi
{
diff --git a/storagehandler.cpp b/storagehandler.cpp
index 24c9d30..929f3b6 100644
--- a/storagehandler.cpp
+++ b/storagehandler.cpp
@@ -1,38 +1,39 @@
-#include <arpa/inet.h>
+#include "storagehandler.hpp"
-#include <algorithm>
-#include <chrono>
-#include <cstdio>
-#if __has_include(<filesystem>)
-#include <filesystem>
-#elif __has_include(<experimental/filesystem>)
-#include <experimental/filesystem>
-namespace std
-{
-// splice experimental::filesystem into std
-namespace filesystem = std::experimental::filesystem;
-} // namespace std
-#else
-#error filesystem not available
-#endif
#include "fruread.hpp"
#include "read_fru_data.hpp"
#include "selutility.hpp"
#include "sensorhandler.hpp"
#include "storageaddsel.hpp"
-#include "storagehandler.hpp"
#include "utils.hpp"
+#include <arpa/inet.h>
#include <host-ipmid/ipmid-api.h>
#include <mapper.h>
#include <systemd/sd-bus.h>
+#include <algorithm>
+#include <chrono>
+#include <cstdio>
#include <phosphor-logging/elog-errors.hpp>
#include <phosphor-logging/log.hpp>
#include <sdbusplus/server.hpp>
#include <string>
#include <xyz/openbmc_project/Common/error.hpp>
+#if __has_include(<filesystem>)
+#include <filesystem>
+#elif __has_include(<experimental/filesystem>)
+#include <experimental/filesystem>
+namespace std
+{
+// splice experimental::filesystem into std
+namespace filesystem = std::experimental::filesystem;
+} // namespace std
+#else
+#error filesystem not available
+#endif
+
void register_netfn_storage_functions() __attribute__((constructor));
unsigned int g_sel_time = 0xFFFFFFFF;
diff --git a/transporthandler.cpp b/transporthandler.cpp
index 217468d..1222d5a 100644
--- a/transporthandler.cpp
+++ b/transporthandler.cpp
@@ -1,34 +1,19 @@
#include "transporthandler.hpp"
-#include <arpa/inet.h>
-
-#include <chrono>
-#include <fstream>
-#include <string>
-
-#if __has_include(<filesystem>)
-#include <filesystem>
-#elif __has_include(<experimental/filesystem>)
-#include <experimental/filesystem>
-namespace std
-{
-// splice experimental::filesystem into std
-namespace filesystem = std::experimental::filesystem;
-} // namespace std
-#else
-#error filesystem not available
-#endif
-
#include "app/channel.hpp"
#include "ipmid.hpp"
#include "net.hpp"
#include "timer.hpp"
#include "utils.hpp"
+#include <arpa/inet.h>
#include <host-ipmid/ipmid-api.h>
+#include <chrono>
+#include <fstream>
#include <phosphor-logging/elog-errors.hpp>
#include <phosphor-logging/log.hpp>
+#include <string>
#include <xyz/openbmc_project/Common/error.hpp>
#define SYSTEMD_NETWORKD_DBUS 1
@@ -38,6 +23,19 @@ namespace filesystem = std::experimental::filesystem;
#include <systemd/sd-bus.h>
#endif
+#if __has_include(<filesystem>)
+#include <filesystem>
+#elif __has_include(<experimental/filesystem>)
+#include <experimental/filesystem>
+namespace std
+{
+// splice experimental::filesystem into std
+namespace filesystem = std::experimental::filesystem;
+} // namespace std
+#else
+#error filesystem not available
+#endif
+
extern std::unique_ptr<phosphor::ipmi::Timer> networkTimer;
const int SIZE_MAC = 18; // xx:xx:xx:xx:xx:xx
OpenPOWER on IntegriCloud