diff options
-rw-r--r-- | app/watchdog.cpp | 3 | ||||
-rw-r--r-- | app/watchdog.hpp | 2 | ||||
-rw-r--r-- | app/watchdog_service.cpp | 4 | ||||
-rw-r--r-- | apphandler.cpp | 6 | ||||
-rw-r--r-- | apphandler.hpp (renamed from apphandler.h) | 5 | ||||
-rw-r--r-- | chassishandler.cpp | 9 | ||||
-rw-r--r-- | chassishandler.hpp (renamed from chassishandler.h) | 5 | ||||
-rw-r--r-- | dcmihandler.cpp | 3 | ||||
-rw-r--r-- | dcmihandler.hpp | 5 | ||||
-rw-r--r-- | fruread.hpp | 5 | ||||
-rw-r--r-- | globalhandler.cpp | 8 | ||||
-rw-r--r-- | globalhandler.hpp (renamed from globalhandler.h) | 5 | ||||
-rw-r--r-- | groupext.cpp | 3 | ||||
-rw-r--r-- | host-cmd-manager.cpp | 12 | ||||
-rw-r--r-- | host-interface.cpp | 11 | ||||
-rw-r--r-- | host-ipmid/oemopenbmc.hpp | 4 | ||||
-rw-r--r-- | ipmid.cpp | 11 | ||||
-rw-r--r-- | ipmid.hpp | 9 | ||||
-rw-r--r-- | ipmisensor.cpp | 4 | ||||
-rw-r--r-- | ipmiwhitelist.hpp | 5 | ||||
-rw-r--r-- | oemrouter.cpp | 3 | ||||
-rw-r--r-- | read_fru_data.cpp | 4 | ||||
-rw-r--r-- | selutility.cpp | 11 | ||||
-rw-r--r-- | sensordatahandler.cpp | 3 | ||||
-rw-r--r-- | sensordatahandler.hpp | 5 | ||||
-rw-r--r-- | sensorhandler.cpp | 5 | ||||
-rw-r--r-- | sensorhandler.hpp (renamed from sensorhandler.h) | 7 | ||||
-rw-r--r-- | storageaddsel.cpp | 7 | ||||
-rw-r--r-- | storageaddsel.hpp (renamed from storageaddsel.h) | 2 | ||||
-rw-r--r-- | storagehandler.cpp | 9 | ||||
-rw-r--r-- | storagehandler.hpp (renamed from storagehandler.h) | 4 | ||||
-rw-r--r-- | systemintfcmds.cpp | 6 | ||||
-rw-r--r-- | systemintfcmds.hpp (renamed from systemintfcmds.h) | 5 | ||||
-rw-r--r-- | test/oemrouter_unittest.cpp | 4 | ||||
-rw-r--r-- | testaddsel.cpp | 4 | ||||
-rw-r--r-- | transporthandler.cpp | 4 |
36 files changed, 87 insertions, 115 deletions
diff --git a/app/watchdog.cpp b/app/watchdog.cpp index f6818cb..3d8e227 100644 --- a/app/watchdog.cpp +++ b/app/watchdog.cpp @@ -4,6 +4,7 @@ #include "watchdog_service.hpp" #include <endian.h> +#include <host-ipmid/ipmid-api.h> #include <cstdint> #include <phosphor-logging/elog-errors.hpp> @@ -12,8 +13,6 @@ #include <string> #include <xyz/openbmc_project/Common/error.hpp> -#include "host-ipmid/ipmid-api.h" - using phosphor::logging::commit; using phosphor::logging::level; using phosphor::logging::log; diff --git a/app/watchdog.hpp b/app/watchdog.hpp index 507695f..268ca92 100644 --- a/app/watchdog.hpp +++ b/app/watchdog.hpp @@ -1,6 +1,6 @@ #pragma once -#include "host-ipmid/ipmid-api.h" +#include <host-ipmid/ipmid-api.h> /** @brief The RESET watchdog IPMI command. * diff --git a/app/watchdog_service.cpp b/app/watchdog_service.cpp index 923264b..769a70d 100644 --- a/app/watchdog_service.cpp +++ b/app/watchdog_service.cpp @@ -1,5 +1,7 @@ #include "watchdog_service.hpp" +#include <host-ipmid/ipmid-api.h> + #include <exception> #include <phosphor-logging/elog-errors.hpp> #include <phosphor-logging/elog.hpp> @@ -11,8 +13,6 @@ #include <xyz/openbmc_project/Common/error.hpp> #include <xyz/openbmc_project/State/Watchdog/server.hpp> -#include "host-ipmid/ipmid-api.h" - using phosphor::logging::elog; using phosphor::logging::entry; using phosphor::logging::level; diff --git a/apphandler.cpp b/apphandler.cpp index 4a2f2da..c77f014 100644 --- a/apphandler.cpp +++ b/apphandler.cpp @@ -1,15 +1,15 @@ -#include "apphandler.h" +#include "apphandler.hpp" #include "app/channel.hpp" #include "app/watchdog.hpp" #include "ipmid.hpp" -#include "nlohmann/json.hpp" #include "sys_info_param.hpp" #include "transporthandler.hpp" #include "types.hpp" #include "utils.hpp" #include <arpa/inet.h> +#include <host-ipmid/ipmid-api.h> #include <limits.h> #include <mapper.h> #include <stdint.h> @@ -17,7 +17,7 @@ #include <systemd/sd-bus.h> #include <unistd.h> -#include "host-ipmid/ipmid-api.h" +#include <nlohmann/json.hpp> #if __has_include(<filesystem>) #include <filesystem> diff --git a/apphandler.h b/apphandler.hpp index cbfafb2..3d377fb 100644 --- a/apphandler.h +++ b/apphandler.hpp @@ -1,5 +1,4 @@ -#ifndef __HOST_IPMI_APP_HANDLER_H__ -#define __HOST_IPMI_APP_HANDLER_H__ +#pragma once #include <stdint.h> @@ -36,5 +35,3 @@ enum ipmi_app_sysinfo_params IPMI_SYSINFO_OS_HYP_URL = 0x07, IPMI_SYSINFO_OEM_START = 0xC0, // Start of range of OEM parameters }; - -#endif diff --git a/chassishandler.cpp b/chassishandler.cpp index bfc079d..5e86f17 100644 --- a/chassishandler.cpp +++ b/chassishandler.cpp @@ -1,4 +1,6 @@ -#include "chassishandler.h" +#include "config.h" + +#include "chassishandler.hpp" #include "ipmid.hpp" #include "settings.hpp" @@ -7,6 +9,7 @@ #include <arpa/inet.h> #include <endian.h> +#include <host-ipmid/ipmid-api.h> #include <limits.h> #include <mapper.h> #include <netinet/in.h> @@ -20,8 +23,6 @@ #include <fstream> #include <future> #include <sstream> - -#include "host-ipmid/ipmid-api.h" #if __has_include(<filesystem>) #include <filesystem> #elif __has_include(<experimental/filesystem>) @@ -34,7 +35,6 @@ namespace filesystem = std::experimental::filesystem; #else #error filesystem not available #endif -#include "config.h" #include "timer.hpp" @@ -50,6 +50,7 @@ namespace filesystem = std::experimental::filesystem; #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/chassishandler.h b/chassishandler.hpp index 0c6d5a2..6535c0e 100644 --- a/chassishandler.h +++ b/chassishandler.hpp @@ -1,5 +1,4 @@ -#ifndef __HOST_IPMI_CHASSIS_HANDLER_H__ -#define __HOST_IPMI_CHASSIS_HANDLER_H__ +#pragma once #include <stdint.h> @@ -58,5 +57,3 @@ enum class BootOptionResponseSize : size_t BOOT_FLAGS = 5, OPAL_NETWORK_SETTINGS = 50 }; - -#endif diff --git a/dcmihandler.cpp b/dcmihandler.cpp index 951b6ba..5f13ea2 100644 --- a/dcmihandler.cpp +++ b/dcmihandler.cpp @@ -5,6 +5,7 @@ #include "net.hpp" #include "utils.hpp" +#include <host-ipmid/ipmid-api.h> #include <stdint.h> #include <stdio.h> #include <string.h> @@ -18,8 +19,6 @@ #include <sdbusplus/bus.hpp> #include <xyz/openbmc_project/Common/error.hpp> -#include "host-ipmid/ipmid-api.h" - using namespace phosphor::logging; using InternalFailure = sdbusplus::xyz::openbmc_project::Common::Error::InternalFailure; diff --git a/dcmihandler.hpp b/dcmihandler.hpp index 6e64faf..29757ff 100644 --- a/dcmihandler.hpp +++ b/dcmihandler.hpp @@ -1,5 +1,4 @@ -#ifndef __HOST_IPMI_DCMI_HANDLER_H__ -#define __HOST_IPMI_DCMI_HANDLER_H__ +#pragma once #include "nlohmann/json.hpp" @@ -628,5 +627,3 @@ struct GetConfParamsResponse } __attribute__((packed)); } // namespace dcmi - -#endif diff --git a/fruread.hpp b/fruread.hpp index 20f260c..a2fb650 100644 --- a/fruread.hpp +++ b/fruread.hpp @@ -1,5 +1,4 @@ -#ifndef OPENBMC_IPMI_FRU_READ_H -#define OPENBMC_IPMI_FRU_READ_H +#pragma once #include <systemd/sd-bus.h> @@ -35,5 +34,3 @@ using FruInstanceVec = std::vector<FruInstance>; using FruId = uint32_t; using FruMap = std::map<FruId, FruInstanceVec>; - -#endif diff --git a/globalhandler.cpp b/globalhandler.cpp index 55761b4..61a2a80 100644 --- a/globalhandler.cpp +++ b/globalhandler.cpp @@ -1,16 +1,16 @@ -#include "globalhandler.h" +#include "globalhandler.hpp" +#include "utils.hpp" + +#include <host-ipmid/ipmid-api.h> #include <stdio.h> #include <phosphor-logging/elog-errors.hpp> #include <phosphor-logging/log.hpp> #include <string> -#include <utils.hpp> #include <xyz/openbmc_project/Common/error.hpp> #include <xyz/openbmc_project/State/BMC/server.hpp> -#include "host-ipmid/ipmid-api.h" - static constexpr auto bmcStateRoot = "/xyz/openbmc_project/state"; static constexpr auto bmcStateIntf = "xyz.openbmc_project.State.BMC"; static constexpr auto reqTransition = "RequestedBMCTransition"; diff --git a/globalhandler.h b/globalhandler.hpp index dcdb68d..23d3b3e 100644 --- a/globalhandler.h +++ b/globalhandler.hpp @@ -1,5 +1,4 @@ -#ifndef __HOST_IPMI_GLOBAL_HANDLER_H__ -#define __HOST_IPMI_GLOBAL_HANDLER_H__ +#pragma once #include <stdint.h> @@ -9,5 +8,3 @@ enum ipmi_global_control_cmds : uint8_t IPMI_CMD_COLD_RESET = 0x02, IPMI_CMD_WARM_RESET = 0x03, }; - -#endif diff --git a/groupext.cpp b/groupext.cpp index 0d8bfe0..616f366 100644 --- a/groupext.cpp +++ b/groupext.cpp @@ -1,10 +1,9 @@ #include "ipmid.hpp" +#include <host-ipmid/ipmid-api.h> #include <stdint.h> #include <stdio.h> -#include "host-ipmid/ipmid-api.h" - #define GRPEXT_GET_GROUP_CMD 0 void register_netfn_groupext_functions() __attribute__((constructor)); diff --git a/host-cmd-manager.cpp b/host-cmd-manager.cpp index 90e932b..4084910 100644 --- a/host-cmd-manager.cpp +++ b/host-cmd-manager.cpp @@ -1,12 +1,14 @@ -#include <config.h> -#include <systemintfcmds.h> +#include "config.h" + +#include "host-cmd-manager.hpp" + +#include "systemintfcmds.hpp" +#include "timer.hpp" +#include "utils.hpp" #include <chrono> -#include <host-cmd-manager.hpp> #include <phosphor-logging/elog-errors.hpp> #include <phosphor-logging/log.hpp> -#include <timer.hpp> -#include <utils.hpp> #include <xyz/openbmc_project/Common/error.hpp> #include <xyz/openbmc_project/State/Host/server.hpp> diff --git a/host-interface.cpp b/host-interface.cpp index 1f27163..2a3e6ce 100644 --- a/host-interface.cpp +++ b/host-interface.cpp @@ -1,12 +1,15 @@ -#include <config.h> -#include <systemintfcmds.h> +#include "config.h" + +#include "host-interface.hpp" + +#include "systemintfcmds.hpp" +#include "utils.hpp" #include <functional> -#include <host-interface.hpp> #include <host-ipmid/ipmid-host-cmd-utils.hpp> #include <host-ipmid/ipmid-host-cmd.hpp> #include <phosphor-logging/log.hpp> -#include <utils.hpp> + namespace phosphor { namespace host diff --git a/host-ipmid/oemopenbmc.hpp b/host-ipmid/oemopenbmc.hpp index 73a3f9f..02e7e5c 100644 --- a/host-ipmid/oemopenbmc.hpp +++ b/host-ipmid/oemopenbmc.hpp @@ -1,8 +1,8 @@ #pragma once -#include "host-ipmid/oemrouter.hpp" +#include <host-ipmid/ipmid-api.h> -#include "host-ipmid/ipmid-api.h" +#include <host-ipmid/oemrouter.hpp> namespace oem { @@ -1,7 +1,10 @@ #include "ipmid.hpp" -#include "host-ipmid/oemrouter.hpp" +#include "host-cmd-manager.hpp" +#include "ipmiwhitelist.hpp" +#include "sensorhandler.hpp" #include "settings.hpp" +#include "timer.hpp" #include <assert.h> #include <dirent.h> @@ -16,22 +19,18 @@ #include <unistd.h> #include <algorithm> -#include <host-cmd-manager.hpp> #include <host-ipmid/ipmid-host-cmd.hpp> +#include <host-ipmid/oemrouter.hpp> #include <iostream> -#include <ipmiwhitelist.hpp> #include <iterator> #include <map> #include <memory> #include <phosphor-logging/log.hpp> #include <sdbusplus/bus.hpp> #include <sdbusplus/bus/match.hpp> -#include <timer.hpp> #include <vector> #include <xyz/openbmc_project/Control/Security/RestrictionMode/server.hpp> -#include "sensorhandler.h" - using namespace phosphor::logging; namespace sdbusRule = sdbusplus::bus::match::rules; @@ -1,8 +1,7 @@ -#ifndef __HOST_IPMID_IPMI_H__ -#define __HOST_IPMID_IPMI_H__ -#include <stdio.h> +#pragma once -#include "host-ipmid/ipmid-api.h" +#include <host-ipmid/ipmid-api.h> +#include <stdio.h> // When the requester sends in a netfn and a command along with data, this // function will look for registered handlers that will handle that [netfn,cmd] @@ -23,5 +22,3 @@ ipmi_ret_t ipmi_netfn_router(const ipmi_netfn_t, const ipmi_cmd_t, #define MAX_IPMI_BUFFER 64 extern FILE *ipmiio, *ipmidbus, *ipmicmddetails; - -#endif diff --git a/ipmisensor.cpp b/ipmisensor.cpp index b3fac2c..de8b844 100644 --- a/ipmisensor.cpp +++ b/ipmisensor.cpp @@ -1,10 +1,10 @@ +#include "sensorhandler.hpp" + #include <malloc.h> #include <stdint.h> #include <stdio.h> #include <string.h> -#include "sensorhandler.h" - extern uint8_t find_type_for_sensor_number(uint8_t); struct sensorRES_t diff --git a/ipmiwhitelist.hpp b/ipmiwhitelist.hpp index 7d096c2..fd45a3d 100644 --- a/ipmiwhitelist.hpp +++ b/ipmiwhitelist.hpp @@ -1,5 +1,4 @@ -#ifndef __HOST_IPMID_IPMI_WHITELIST_H__ -#define __HOST_IPMID_IPMI_WHITELIST_H_ +#pragma once #include <utility> #include <vector> @@ -7,5 +6,3 @@ using netfncmd_pair = std::pair<unsigned char, unsigned char>; extern const std::vector<netfncmd_pair> whitelist; - -#endif diff --git a/oemrouter.cpp b/oemrouter.cpp index 64944db..ecfe096 100644 --- a/oemrouter.cpp +++ b/oemrouter.cpp @@ -1,7 +1,6 @@ -#include "host-ipmid/oemrouter.hpp" - #include <cstdio> #include <cstring> +#include <host-ipmid/oemrouter.hpp> #include <map> #include <utility> diff --git a/read_fru_data.cpp b/read_fru_data.cpp index 4581a8c..c7ff61b 100644 --- a/read_fru_data.cpp +++ b/read_fru_data.cpp @@ -4,12 +4,12 @@ #include "types.hpp" #include "utils.hpp" +#include <host-ipmid/ipmid-api.h> + #include <map> #include <phosphor-logging/elog-errors.hpp> #include <xyz/openbmc_project/Common/error.hpp> -#include "host-ipmid/ipmid-api.h" - extern const FruMap frus; namespace ipmi { diff --git a/selutility.cpp b/selutility.cpp index 8e04ad4..228bf62 100644 --- a/selutility.cpp +++ b/selutility.cpp @@ -1,5 +1,10 @@ +#include "config.h" + +#include "selutility.hpp" + #include <chrono> #include <vector> + #if __has_include(<filesystem>) #include <filesystem> #elif __has_include(<experimental/filesystem>) @@ -12,17 +17,15 @@ namespace filesystem = std::experimental::filesystem; #else #error filesystem not available #endif -#include "config.h" -#include "selutility.hpp" #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> -#include "host-ipmid/ipmid-api.h" - extern const ipmi::sensor::InvObjectIDMap invSensors; using namespace phosphor::logging; using InternalFailure = diff --git a/sensordatahandler.cpp b/sensordatahandler.cpp index d4f1251..27dd011 100644 --- a/sensordatahandler.cpp +++ b/sensordatahandler.cpp @@ -12,6 +12,7 @@ namespace filesystem = std::experimental::filesystem; #error filesystem not available #endif #include "sensordatahandler.hpp" +#include "sensorhandler.hpp" #include "types.hpp" #include "utils.hpp" @@ -19,8 +20,6 @@ namespace filesystem = std::experimental::filesystem; #include <phosphor-logging/log.hpp> #include <xyz/openbmc_project/Common/error.hpp> -#include "sensorhandler.h" - namespace ipmi { namespace sensor diff --git a/sensordatahandler.hpp b/sensordatahandler.hpp index 7185116..771303d 100644 --- a/sensordatahandler.hpp +++ b/sensordatahandler.hpp @@ -1,13 +1,12 @@ #pragma once +#include "sensorhandler.hpp" #include "types.hpp" #include "utils.hpp" +#include <host-ipmid/ipmid-api.h> #include <math.h> -#include "host-ipmid/ipmid-api.h" -#include "sensorhandler.h" - namespace ipmi { namespace sensor diff --git a/sensorhandler.cpp b/sensorhandler.cpp index 7c6a4dc..80f7c4b 100644 --- a/sensorhandler.cpp +++ b/sensorhandler.cpp @@ -1,10 +1,11 @@ -#include "sensorhandler.h" +#include "sensorhandler.hpp" #include "fruread.hpp" #include "ipmid.hpp" #include "types.hpp" #include "utils.hpp" +#include <host-ipmid/ipmid-api.h> #include <mapper.h> #include <math.h> #include <stdio.h> @@ -18,8 +19,6 @@ #include <xyz/openbmc_project/Common/error.hpp> #include <xyz/openbmc_project/Sensor/Value/server.hpp> -#include "host-ipmid/ipmid-api.h" - static constexpr uint8_t fruInventoryDevice = 0x10; static constexpr uint8_t IPMIFruInventory = 0x02; static constexpr uint8_t BMCSlaveAddress = 0x20; diff --git a/sensorhandler.h b/sensorhandler.hpp index 3f2fd99..b32034f 100644 --- a/sensorhandler.h +++ b/sensorhandler.hpp @@ -1,12 +1,10 @@ -#ifndef __HOST_IPMI_SEN_HANDLER_H__ -#define __HOST_IPMI_SEN_HANDLER_H__ +#pragma once #include "types.hpp" +#include <host-ipmid/ipmid-api.h> #include <stdint.h> -#include "host-ipmid/ipmid-api.h" - // IPMI commands for net functions. enum ipmi_netfn_sen_cmds { @@ -639,4 +637,3 @@ inline void enableScanning(ipmi::sensor::GetReadingResponse* resp) } // namespace sensor } // namespace ipmi -#endif diff --git a/storageaddsel.cpp b/storageaddsel.cpp index 95fcddf..9213481 100644 --- a/storageaddsel.cpp +++ b/storageaddsel.cpp @@ -1,7 +1,10 @@ #include "elog-errors.hpp" #include "error-HostEvent.hpp" +#include "sensorhandler.hpp" +#include "storagehandler.hpp" #include "types.hpp" +#include <host-ipmid/ipmid-api.h> #include <mapper.h> #include <stdint.h> #include <systemd/sd-bus.h> @@ -16,10 +19,6 @@ #include <vector> #include <xyz/openbmc_project/Logging/Entry/server.hpp> -#include "host-ipmid/ipmid-api.h" -#include "sensorhandler.h" -#include "storagehandler.h" - using namespace std; using namespace phosphor::logging; using namespace sdbusplus::xyz::openbmc_project::Logging::server; diff --git a/storageaddsel.h b/storageaddsel.hpp index 113254b..c25ead3 100644 --- a/storageaddsel.h +++ b/storageaddsel.hpp @@ -1,3 +1,5 @@ +#pragma once + #include <stdint.h> void send_esel(uint16_t recordid); diff --git a/storagehandler.cpp b/storagehandler.cpp index 871eae6..24c9d30 100644 --- a/storagehandler.cpp +++ b/storagehandler.cpp @@ -18,8 +18,12 @@ namespace filesystem = std::experimental::filesystem; #include "fruread.hpp" #include "read_fru_data.hpp" #include "selutility.hpp" +#include "sensorhandler.hpp" +#include "storageaddsel.hpp" +#include "storagehandler.hpp" #include "utils.hpp" +#include <host-ipmid/ipmid-api.h> #include <mapper.h> #include <systemd/sd-bus.h> @@ -29,11 +33,6 @@ namespace filesystem = std::experimental::filesystem; #include <string> #include <xyz/openbmc_project/Common/error.hpp> -#include "host-ipmid/ipmid-api.h" -#include "sensorhandler.h" -#include "storageaddsel.h" -#include "storagehandler.h" - void register_netfn_storage_functions() __attribute__((constructor)); unsigned int g_sel_time = 0xFFFFFFFF; diff --git a/storagehandler.h b/storagehandler.hpp index 0aef3e3..cccd62e 100644 --- a/storagehandler.h +++ b/storagehandler.hpp @@ -1,5 +1,4 @@ -#ifndef __HOST_IPMI_STORAGE_HANDLER_H__ -#define __HOST_IPMI_STORAGE_HANDLER_H__ +#pragma once #include <cstdint> @@ -88,4 +87,3 @@ struct GetRepositoryInfoResponse uint8_t deletionTimestamp[4]; //< Most recent deletion timestamp LS first uint8_t operationSupport; //< Operation support } __attribute__((packed)); -#endif diff --git a/systemintfcmds.cpp b/systemintfcmds.cpp index c39a7af..af646d1 100644 --- a/systemintfcmds.cpp +++ b/systemintfcmds.cpp @@ -1,15 +1,15 @@ #include "config.h" -#include "systemintfcmds.h" +#include "systemintfcmds.hpp" #include "host-cmd-manager.hpp" #include "host-interface.hpp" -#include "host-ipmid/ipmid-host-cmd.hpp" +#include <host-ipmid/ipmid-api.h> #include <mapper.h> #include <stdio.h> -#include "host-ipmid/ipmid-api.h" +#include <host-ipmid/ipmid-host-cmd.hpp> void register_netfn_app_functions() __attribute__((constructor)); diff --git a/systemintfcmds.h b/systemintfcmds.hpp index 0243c02..c0b3318 100644 --- a/systemintfcmds.h +++ b/systemintfcmds.hpp @@ -1,5 +1,4 @@ -#ifndef __SYSTEM_INTF_CMDS_HANDLER_H__ -#define __SYSTEM_INTF_CMDS_HANDLER_H__ +#pragma once #include <stdint.h> @@ -42,5 +41,3 @@ struct oem_sel_timestamped uint8_t cmd; uint8_t data[4]; }; - -#endif diff --git a/test/oemrouter_unittest.cpp b/test/oemrouter_unittest.cpp index b48798b..ec79316 100644 --- a/test/oemrouter_unittest.cpp +++ b/test/oemrouter_unittest.cpp @@ -1,8 +1,8 @@ -#include "host-ipmid/oemrouter.hpp" +#include <host-ipmid/ipmid-api.h> #include <cstring> +#include <host-ipmid/oemrouter.hpp> -#include "host-ipmid/ipmid-api.h" #include "sample.h" #include <gtest/gtest.h> diff --git a/testaddsel.cpp b/testaddsel.cpp index 7f42acb..e44ecb7 100644 --- a/testaddsel.cpp +++ b/testaddsel.cpp @@ -1,3 +1,5 @@ +#include "sensorhandler.hpp" + #include <errno.h> #include <limits.h> #include <mapper.h> @@ -6,8 +8,6 @@ #include <stdlib.h> #include <systemd/sd-bus.h> -#include "sensorhandler.h" - extern void send_esel(uint16_t recordid); sd_bus* bus = NULL; diff --git a/transporthandler.cpp b/transporthandler.cpp index a6239ea..92ada92 100644 --- a/transporthandler.cpp +++ b/transporthandler.cpp @@ -26,12 +26,12 @@ namespace filesystem = std::experimental::filesystem; #include "transporthandler.hpp" #include "utils.hpp" +#include <host-ipmid/ipmid-api.h> + #include <phosphor-logging/elog-errors.hpp> #include <phosphor-logging/log.hpp> #include <xyz/openbmc_project/Common/error.hpp> -#include "host-ipmid/ipmid-api.h" - #define SYSTEMD_NETWORKD_DBUS 1 #ifdef SYSTEMD_NETWORKD_DBUS |