treewide: Codify memory pinning
This enforces movability constraints.
Change-Id: I49dbd43a791c1d70eb7e97f30708231c053901d9
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/src/network_manager.hpp b/src/network_manager.hpp
index 890a837..490c4bc 100644
--- a/src/network_manager.hpp
+++ b/src/network_manager.hpp
@@ -11,6 +11,7 @@
#include <sdbusplus/bus.hpp>
#include <sdbusplus/bus/match.hpp>
#include <sdbusplus/message/native_types.hpp>
+#include <stdplus/pinned.hpp>
#include <stdplus/zstring_view.hpp>
#include <string>
#include <string_view>
@@ -41,8 +42,6 @@
class Manager : public ManagerIface
{
public:
- Manager(const Manager&) = delete;
- Manager& operator=(const Manager&) = delete;
Manager(Manager&&) = delete;
Manager& operator=(Manager&&) = delete;
@@ -52,7 +51,7 @@
* @param[in] objPath - Path to attach at.
* @param[in] confDir - Network Configuration directory path.
*/
- Manager(sdbusplus::bus_t& bus, DelayedExecutor& reload,
+ Manager(stdplus::PinnedRef<sdbusplus::bus_t> bus, DelayedExecutor& reload,
stdplus::zstring_view objPath,
const std::filesystem::path& confDir);
@@ -133,7 +132,7 @@
DelayedExecutor& reload;
/** @brief Persistent sdbusplus DBus bus connection. */
- sdbusplus::bus_t& bus;
+ stdplus::PinnedRef<sdbusplus::bus_t> bus;
/** @brief BMC network reset - resets network configuration for BMC. */
void reset() override;