lpc_aspeed: delete copy/assignment of object
The object is never destroyed, only created, but lets enforce move
semantics due to it holding onto files.
Change-Id: Ib484c4c22bf4033402cc2ab3013d7fb898fde155
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/lpc_aspeed.hpp b/lpc_aspeed.hpp
index 56d1479..8ffaa8f 100644
--- a/lpc_aspeed.hpp
+++ b/lpc_aspeed.hpp
@@ -18,11 +18,19 @@
static std::unique_ptr<HardwareMapperInterface>
createAspeedMapper(std::uint32_t regionAddress, std::size_t regionSize);
+ /* NOTE: This object is created and then never destroyed (unless ipmid
+ * stops/crashes, etc)
+ */
LpcMapperAspeed(std::uint32_t regionAddress, std::size_t regionSize,
const internal::Sys* sys = &internal::sys_impl) :
regionAddress(regionAddress),
regionSize(regionSize), sys(sys){};
+ LpcMapperAspeed(const LpcMapperAspeed&) = delete;
+ LpcMapperAspeed& operator=(const LpcMapperAspeed&) = delete;
+ LpcMapperAspeed(LpcMapperAspeed&&) = default;
+ LpcMapperAspeed& operator=(LpcMapperAspeed&&) = default;
+
void close() override;
std::pair<std::uint32_t, std::uint32_t>