PEL: Skip purging PEL if it has associated hw isolation entry

When PELs reaches to certain limits, either in total size or
total number of them, the code starts removing older pels
based on certain criteria. During this process make sure
no pel is removed that has an associated hardware isolation
entry record or error_log event record.

Signed-off-by: Sumit Kumar <sumit_kumar@in.ibm.com>
Change-Id: Ia7c9af6911bcf2ac8f8ec046d4c7a7a12d9b2bbd
diff --git a/extensions/openpower-pels/repository.hpp b/extensions/openpower-pels/repository.hpp
index b2fc797..2e8d2d6 100644
--- a/extensions/openpower-pels/repository.hpp
+++ b/extensions/openpower-pels/repository.hpp
@@ -402,10 +402,12 @@
      *   Pass 3: only delete PHYP sent PELs
      *   Pass 4: delete all PELs
      *
+     * @param[in] ids - The OpenBMC event log Ids with hardware isolation entry.
+     *
      * @return std::vector<uint32_t> - The OpenBMC event log IDs of
      *                                 the PELs that were deleted.
      */
-    std::vector<uint32_t> prune();
+    std::vector<uint32_t> prune(const std::vector<uint32_t>& idsWithHwIsoEntry);
 
     /**
      * @brief Returns the path to the directory where the PEL
@@ -558,11 +560,14 @@
      *                           removed.
      * @param[in] isPELType - The bool(const PELAttributes&) function
      *                         used to select the PELs to operate on.
+     * @param[in] ids - The OpenBMC event log Ids with hardware isolation
+     *                   entry.
      *
      * @param[out] removedBMCLogIDs - The OpenBMC event log IDs of the
      *                                removed PELs.
      */
     void removePELs(IsOverLimitFunc& isOverLimit, IsPELTypeFunc& isPELType,
+                    const std::vector<uint32_t>& idsWithHwIsoEntry,
                     std::vector<uint32_t>& removedBMCLogIDs);
     /**
      * @brief The filesystem path to the PEL logs.