PEL: Prohibit PEL resolving if associated guard record exists
The commit prohibits marking the 'Resolve' flag of the PEL as 'true'
until the associated guard record resolved if one exists.The user will
get notified with the same by throwing the DBUS error
`sdbusplus::xyz::openbmc_project::Common::Error::Unavailable`.
Implemented approach:
The PELs will be prohibited from deleting also if the PEL is
associated with a guard record. Hence, implementation is like that
resolve will be prohibited until delete does the same.
Tested:
Sample output:
```
busctl set-property xyz.openbmc_project.Logging
/xyz/openbmc_project/logging/entry/406 xyz.openbmc_project.Logging.Entry
Resolved b true
Failed to set property Resolved on interface xyz.openbmc_project.Logging.Entry:
The service is temporarily unavailable.
```
Change-Id: I77cc191e95c494423d3c875c231fdace8237cf22
Signed-off-by: Arya K Padman<aryakpadman@gmail.com>
diff --git a/extensions.hpp b/extensions.hpp
index ff74137..727e288 100644
--- a/extensions.hpp
+++ b/extensions.hpp
@@ -45,6 +45,10 @@
/**
* @brief The function type that will to check if an event log is prohibited
* from being deleted.
+ * The same function is used to check if an event log is prohibited from
+ * setting Resolved flag, as Resolve is prohibited as long as Delete is
+ * prohibited.
+ *
* @param[in] uint32_t - The event log ID
* @param[out] bool - set to true if the delete is prohibited
*/