summaryrefslogtreecommitdiffstats
path: root/utils.hpp
diff options
context:
space:
mode:
authorVishwanatha Subbanna <vishwa@linux.vnet.ibm.com>2017-07-24 23:13:14 +0530
committerVishwanatha Subbanna <vishwa@linux.vnet.ibm.com>2017-08-02 22:52:49 +0530
commit30e329add77a72fffeb21e9d3203062a042c6f30 (patch)
treefda3abac4a04814232b8239afe26da21c65954b0 /utils.hpp
parent6add0b810bfd859ad21cb6b3f98b0bbfaa15aa62 (diff)
downloadopenpower-occ-control-30e329add77a72fffeb21e9d3203062a042c6f30.tar.gz
openpower-occ-control-30e329add77a72fffeb21e9d3203062a042c6f30.zip
Reset OCC on error condition
After detecting the error in the OCC, invokes OccReset command in Host Control dbus object with the sensor ID of the failing OCC Fixes openbmc/openbmc#1363 Change-Id: I608dbbb943d3b39d0709d6f350ab799e771a13e9 Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
Diffstat (limited to 'utils.hpp')
-rw-r--r--utils.hpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/utils.hpp b/utils.hpp
new file mode 100644
index 0000000..51f9832
--- /dev/null
+++ b/utils.hpp
@@ -0,0 +1,23 @@
+#pragma once
+
+#include <sdbusplus/bus.hpp>
+#include <string>
+namespace open_power
+{
+namespace occ
+{
+/**
+ * @brief Gets the D-Bus Service name for the input D-Bus path
+ *
+ * @param[in] bus - Bus handler
+ * @param[in] intf - Interface
+ * @param[in] path - Object Path
+ *
+ * @return Service name
+ * @error InternalFailure exception thrown
+ */
+std::string getService(sdbusplus::bus::bus& bus,
+ const std::string& intf,
+ const std::string& path);
+} // namespace occ
+} // namespace open_power
OpenPOWER on IntegriCloud