spawn async task to clean used BIOS images
There is a missing remnant from software manager refactor where a task
needs to be spawned to clean the used/old BIOS firmware images. Add the
logic to spawn this task as part of onStateChangesBios.
Testing:
Tested and Verified by Kamalesh and T.Chau Ly as per discord comment
[1].
[1] https://discord.com/channels/775381525260664832/1395349728459231316/1399291253769637930
Change-Id: I4b86f75eb8300669c0801e0baf1be6c814250945
Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>
diff --git a/bmc/item_updater.cpp b/bmc/item_updater.cpp
index 77c9a70..02c20c7 100644
--- a/bmc/item_updater.cpp
+++ b/bmc/item_updater.cpp
@@ -150,7 +150,7 @@
bmcInventoryPath));
activations.insert(std::make_pair(
id, std::make_unique<Activation>(
- bus, path, *this, id, server::Activation::Activations::NotReady,
+ ctx, path, *this, id, server::Activation::Activations::NotReady,
associations)));
activations[id]->applyTime = applyTime;
}
@@ -195,7 +195,7 @@
if (activation == activations.end())
{
activations.insert(std::make_pair(
- id, std::make_unique<Activation>(bus, path, *this, id,
+ id, std::make_unique<Activation>(ctx, path, *this, id,
activationState, associations)));
}
else
@@ -397,7 +397,7 @@
// Create Activation instance for this version.
activations.insert(std::make_pair(
id, std::make_unique<Activation>(
- bus, path, *this, id, activationState, associations)));
+ ctx, path, *this, id, activationState, associations)));
#ifdef BMC_STATIC_DUAL_IMAGE
uint8_t priority;
@@ -964,7 +964,7 @@
auto version = "null";
AssociationList assocs;
biosActivation = std::make_unique<Activation>(
- bus, path, *this, versionId, server::Activation::Activations::Active,
+ ctx, path, *this, versionId, server::Activation::Activations::Active,
assocs);
auto dummyErase = [](const std::string& /*entryId*/) {
// Do nothing;