boot-block: clear block on error resolve
If the blocking error is resolved then remove the blocking object and
it's property change callback
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Change-Id: I9acb844ef273e8390b4f5283f234990b3c008e70
diff --git a/log_manager.hpp b/log_manager.hpp
index 700a39a..87dd038 100644
--- a/log_manager.hpp
+++ b/log_manager.hpp
@@ -141,6 +141,15 @@
return blockingErrors.size();
}
+ /** @brief Returns the number of property change callback objects
+ *
+ * @return int - count of property callback entries
+ */
+ int getEntryCallbackSize()
+ {
+ return propChangedEntryCallback.size();
+ }
+
sdbusplus::bus::bus& getBus()
{
return busLog;
@@ -264,6 +273,19 @@
std::vector<std::string> additionalData,
const FFDCEntries& ffdc = FFDCEntries{});
+ /** @brief Notified on entry property changes
+ *
+ * If an entry is blocking, this callback will be registered to monitor for
+ * the entry having it's Resolved field set to true. If it is then remove
+ * the blocking object.
+ *
+ * @param[in] msg - sdbusplus dbusmessage
+ */
+ void onEntryResolve(sdbusplus::message::message& msg);
+
+ /** @brief Remove block objects for any resolved entries */
+ void findAndRemoveResolvedBlocks();
+
/** @brief Persistent sdbusplus DBus bus connection. */
sdbusplus::bus::bus& busLog;
@@ -284,6 +306,10 @@
/** @brief Array of blocking errors */
std::vector<std::unique_ptr<Block>> blockingErrors;
+
+ /** @brief Map of entry id to call back object on properties changed */
+ std::map<uint32_t, std::unique_ptr<sdbusplus::bus::match::match>>
+ propChangedEntryCallback;
};
} // namespace internal