diff options
author | Andrew Geissler <andrewg@us.ibm.com> | 2017-08-19 13:44:44 -0500 |
---|---|---|
committer | Andrew Geissler <andrewg@us.ibm.com> | 2017-08-19 13:44:44 -0500 |
commit | d8dd9b25ac65043ad0cb7734919bf96084b47831 (patch) | |
tree | 5bf1ed1782a3a1a71f01a0de2cbe702adbab64fb | |
parent | d1df1e2755d7d943d1a5519ed86ec6291a7feaa5 (diff) | |
download | openpower-proc-control-d8dd9b25ac65043ad0cb7734919bf96084b47831.tar.gz openpower-proc-control-d8dd9b25ac65043ad0cb7734919bf96084b47831.zip |
Convert over to uint32_t for AttemptsLeft
I missed the fact that the type for the reboot attempts property
changed when code was refactored to the new
xyz.openbmc_project.Control.Boot.RebootAttempts object
Resolves openbmc/openbmc#2178
Change-Id: I297d427b6fa5b9dc0077aab437548d53603c835f
Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
-rw-r--r-- | ext_interface.cpp | 6 | ||||
-rw-r--r-- | ext_interface.hpp | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/ext_interface.cpp b/ext_interface.cpp index b1f573f..b1902d4 100644 --- a/ext_interface.cpp +++ b/ext_interface.cpp @@ -60,7 +60,7 @@ std::string getService(sdbusplus::bus::bus& bus, } -int getBootCount() +uint32_t getBootCount() { auto bus = sdbusplus::bus::new_default(); @@ -68,7 +68,6 @@ int getBootCount() REBOOTCOUNTER_INTERFACE, REBOOTCOUNTER_PATH); - sdbusplus::message::variant<int> rebootCount = 0; auto method = bus.new_method_call(rebootSvc.c_str(), REBOOTCOUNTER_PATH, "org.freedesktop.DBus.Properties", @@ -82,7 +81,8 @@ int getBootCount() // TODO openbmc/openbmc#851 - Once available, throw returned error throw std::runtime_error("ERROR in reading BOOTCOUNT"); } + sdbusplus::message::variant<uint32_t> rebootCount; reply.read(rebootCount); - return (sdbusplus::message::variant_ns::get<int>(rebootCount)); + return (rebootCount.get<uint32_t>()); } diff --git a/ext_interface.hpp b/ext_interface.hpp index deb21d8..de34fef 100644 --- a/ext_interface.hpp +++ b/ext_interface.hpp @@ -8,4 +8,4 @@ * * @return Number of boot attempts left **/ -int getBootCount(); +uint32_t getBootCount(); |