Log a PEL for communication, presence mismatch, and safe state errors

Add code to log a PEL in various error scenarios. Refactor some of the
error handling to get the return code out of the driver.

Signed-off-by: Eddie James <eajames@linux.ibm.com>
Change-Id: Ifd91cfc063718e484ec8886df8357d115c6b41e3
diff --git a/occ_ffdc.hpp b/occ_ffdc.hpp
index a4c882d..a2b1200 100644
--- a/occ_ffdc.hpp
+++ b/occ_ffdc.hpp
@@ -53,6 +53,17 @@
     static uint32_t createPEL(const char* path, uint32_t src6, const char* msg,
                               int fd = -1);
 
+    /** @brief Helper function to create a PEL for the OCC reset with the
+     * OpenPower DBus interface
+     *
+     * @param[in] instance - the OCC instance id
+     * @param[in] path - the DBus error path
+     * @param[in] err - the error return code
+     * @param[in] callout - the PEL callout path
+     */
+    static void createOCCResetPEL(unsigned int instance, const char* path,
+                                  int err, const char* callout);
+
   private:
     /** @brief OCC instance number. Ex, 0,1, etc */
     unsigned int instance;