summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chassishandler.cpp3
-rw-r--r--read_fru_data.cpp3
-rw-r--r--user_channel/channel_mgmt.cpp3
-rw-r--r--user_channel/user_mgmt.cpp9
4 files changed, 12 insertions, 6 deletions
diff --git a/chassishandler.cpp b/chassishandler.cpp
index 068ad89..c9885bd 100644
--- a/chassishandler.cpp
+++ b/chassishandler.cpp
@@ -54,7 +54,8 @@ namespace filesystem = std::experimental::filesystem;
#define SET_PARM_BOOT_FLAGS_VALID_ONE_TIME 0x80
#define SET_PARM_BOOT_FLAGS_VALID_PERMANENT 0xC0
-std::unique_ptr<phosphor::Timer> identifyTimer = nullptr;
+std::unique_ptr<phosphor::Timer> identifyTimer
+ __attribute__((init_priority(101)));
constexpr size_t SIZE_MAC = 18;
constexpr size_t SIZE_BOOT_OPTION = (uint8_t)
diff --git a/read_fru_data.cpp b/read_fru_data.cpp
index 2bb111f..94b2478 100644
--- a/read_fru_data.cpp
+++ b/read_fru_data.cpp
@@ -23,7 +23,8 @@ namespace variant_ns = sdbusplus::message::variant_ns;
using namespace phosphor::logging;
using InternalFailure =
sdbusplus::xyz::openbmc_project::Common::Error::InternalFailure;
-std::unique_ptr<sdbusplus::bus::match_t> matchPtr(nullptr);
+std::unique_ptr<sdbusplus::bus::match_t> matchPtr
+ __attribute__((init_priority(101)));
static constexpr auto INV_INTF = "xyz.openbmc_project.Inventory.Manager";
static constexpr auto OBJ_PATH = "/xyz/openbmc_project/inventory";
diff --git a/user_channel/channel_mgmt.cpp b/user_channel/channel_mgmt.cpp
index 585d441..9374931 100644
--- a/user_channel/channel_mgmt.cpp
+++ b/user_channel/channel_mgmt.cpp
@@ -89,7 +89,8 @@ static constexpr const uint8_t defaultAuthType =
static constexpr const bool defaultIsIpmiState = false;
static constexpr size_t smallChannelSize = 64;
-std::unique_ptr<sdbusplus::bus::match_t> chPropertiesSignal(nullptr);
+std::unique_ptr<sdbusplus::bus::match_t> chPropertiesSignal
+ __attribute__((init_priority(101)));
// String mappings use in JSON config file
static std::unordered_map<std::string, EChannelMediumType> mediumTypeMap = {
diff --git a/user_channel/user_mgmt.cpp b/user_channel/user_mgmt.cpp
index 0b86823..42a1e09 100644
--- a/user_channel/user_mgmt.cpp
+++ b/user_channel/user_mgmt.cpp
@@ -116,9 +116,12 @@ using NoResource =
using InternalFailure =
sdbusplus::xyz::openbmc_project::Common::Error::InternalFailure;
-std::unique_ptr<sdbusplus::bus::match_t> userUpdatedSignal(nullptr);
-std::unique_ptr<sdbusplus::bus::match_t> userMgrRenamedSignal(nullptr);
-std::unique_ptr<sdbusplus::bus::match_t> userPropertiesSignal(nullptr);
+std::unique_ptr<sdbusplus::bus::match_t> userUpdatedSignal
+ __attribute__((init_priority(101)));
+std::unique_ptr<sdbusplus::bus::match_t> userMgrRenamedSignal
+ __attribute__((init_priority(101)));
+std::unique_ptr<sdbusplus::bus::match_t> userPropertiesSignal
+ __attribute__((init_priority(101)));
// TODO: Below code can be removed once it is moved to common layer libmiscutil
std::string getUserService(sdbusplus::bus::bus& bus, const std::string& intf,
OpenPOWER on IntegriCloud