item_updater: Added erase method
Implements Object.Delete, so item_updater deletes
ReadWrite, ReadOnly partitions, and removes
Version, and Activation from maps.
Resolves openbmc/openbmc#1550
Change-Id: If6d08bc7d380d043c28a26570e4698201cd7f5b0
Signed-off-by: Leonel Gonzalez <lgonzalez@us.ibm.com>
diff --git a/image_manager.cpp b/image_manager.cpp
index bc9ce9e..5242d8b 100644
--- a/image_manager.cpp
+++ b/image_manager.cpp
@@ -172,7 +172,10 @@
objPath,
version,
purpose,
- imageDirPath.string())));
+ imageDirPath.string(),
+ std::bind(&Manager::erase,
+ this,
+ std::placeholders::_1))));
return 0;
}