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>
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_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 @@
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())
{