Pass error to log into shutdown function

Changing the power off utility function to take a
template parameter that specifies the error to log
before the shutdown instead of hardcoding it in
the function.

Also change the 2 callers of this function to pass
in the error type.

Change-Id: Ic83d87d5000f881ed9832092be207e91adf81c0c
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
diff --git a/power-sequencer/runtime_monitor.cpp b/power-sequencer/runtime_monitor.cpp
index 966becc..9bfeaf0 100644
--- a/power-sequencer/runtime_monitor.cpp
+++ b/power-sequencer/runtime_monitor.cpp
@@ -13,8 +13,10 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+#include <org/open_power/Witherspoon/Fault/error.hpp>
 #include <phosphor-logging/log.hpp>
 #include "config.h"
+#include "elog-errors.hpp"
 #include "runtime_monitor.hpp"
 #include "utility.hpp"
 
@@ -24,6 +26,7 @@
 {
 
 using namespace phosphor::logging;
+using namespace sdbusplus::org::open_power::Witherspoon::Fault::Error;
 
 int RuntimeMonitor::run()
 {
@@ -49,7 +52,7 @@
         //power, so it will be killed by systemd sometime shortly
         //after this power off is issued.
 
-        util::powerOff(bus);
+        util::powerOff<Shutdown>(bus);
     }
     catch (std::exception& e)
     {