summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Geissler <andrewg@us.ibm.com>2017-08-07 14:55:42 -0500
committerAndrew Geissler <andrewg@us.ibm.com>2017-08-07 14:55:42 -0500
commitbc7cdf488c20271f4137b111d93bca649310d022 (patch)
tree442d31e4c5b132e5d9595fc26158dbc140c1d8cf
parent23763b1a3823ae8c7591bb12788564354db5a5b0 (diff)
downloadopenpower-proc-control-bc7cdf488c20271f4137b111d93bca649310d022.tar.gz
openpower-proc-control-bc7cdf488c20271f4137b111d93bca649310d022.zip
Move over to new AttempsLeft for reboot count
The reboot count sensor was moved to the xyz namespace and renamed. This commit moves over to using this new sensor for determining SBE boot side. Change-Id: I482ad677272a76608da04f3c9a7807d28d453797 Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
-rw-r--r--ext_interface.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/ext_interface.cpp b/ext_interface.cpp
index d289e20..b1f573f 100644
--- a/ext_interface.cpp
+++ b/ext_interface.cpp
@@ -9,8 +9,8 @@ constexpr auto MAPPER_PATH = "/xyz/openbmc_project/object_mapper";
constexpr auto MAPPER_INTERFACE = "xyz.openbmc_project.ObjectMapper";
// Reboot count
-constexpr auto REBOOTCOUNTER_PATH("/org/openbmc/sensors/host/BootCount");
-constexpr auto REBOOTCOUNTER_INTERFACE("org.openbmc.SensorValue");
+constexpr auto REBOOTCOUNTER_PATH("/xyz/openbmc_project/state/host0");
+constexpr auto REBOOTCOUNTER_INTERFACE("xyz.openbmc_project.Control.Boot.RebootAttempts");
using namespace phosphor::logging;
@@ -71,9 +71,10 @@ int getBootCount()
sdbusplus::message::variant<int> rebootCount = 0;
auto method = bus.new_method_call(rebootSvc.c_str(),
REBOOTCOUNTER_PATH,
- REBOOTCOUNTER_INTERFACE,
- "getValue");
+ "org.freedesktop.DBus.Properties",
+ "Get");
+ method.append(REBOOTCOUNTER_INTERFACE, "AttemptsLeft");
auto reply = bus.call(method);
if (reply.is_method_error())
{
OpenPOWER on IntegriCloud