summaryrefslogtreecommitdiffstats
path: root/storagehandler.cpp
diff options
context:
space:
mode:
authorWilliam A. Kennington III <wak@google.com>2018-10-12 17:18:14 -0700
committerWilliam A. Kennington III <wak@google.com>2018-10-18 15:08:55 -0700
commit4c0080287f2bb19ecfbe5cdd4a334f8769e7d0cd (patch)
treef2edadbb00b55c212c280c90f0cb35d96702bf4e /storagehandler.cpp
parent1181af741589db873676f177ed85d6bc04884aa1 (diff)
downloadphosphor-host-ipmid-4c0080287f2bb19ecfbe5cdd4a334f8769e7d0cd.tar.gz
phosphor-host-ipmid-4c0080287f2bb19ecfbe5cdd4a334f8769e7d0cd.zip
Convert variant usage to std interface
This is just a refactoring to use the c++17 std::variant interfaces instead of the mapbox::variant specific ones. We should be able to use mapbox::variant and std::variant interchangeably now. Tested: Built against sdbusplus with mapbox::variant and sbusplus using std::variant. Both variant compile and test out. Change-Id: I6fbaad3d12dd34968db6a10f3d74a65e07d0f0cc Signed-off-by: William A. Kennington III <wak@google.com>
Diffstat (limited to 'storagehandler.cpp')
-rw-r--r--storagehandler.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/storagehandler.cpp b/storagehandler.cpp
index 0a46b83..5ac116c 100644
--- a/storagehandler.cpp
+++ b/storagehandler.cpp
@@ -18,6 +18,7 @@
#include <cstring>
#include <phosphor-logging/elog-errors.hpp>
#include <phosphor-logging/log.hpp>
+#include <sdbusplus/message/types.hpp>
#include <sdbusplus/server.hpp>
#include <string>
#include <xyz/openbmc_project/Common/error.hpp>
@@ -73,6 +74,8 @@ ipmi::sel::ObjectPaths paths;
} // namespace cache
+namespace variant_ns = sdbusplus::message::variant_ns;
+
using InternalFailure =
sdbusplus::xyz::openbmc_project::Common::Error::InternalFailure;
using namespace phosphor::logging;
@@ -501,7 +504,7 @@ ipmi_ret_t ipmi_storage_get_sel_time(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
return IPMI_CC_UNSPECIFIED_ERROR;
}
reply.read(value);
- host_time_usec = value.get<uint64_t>();
+ host_time_usec = variant_ns::get<uint64_t>(value);
}
catch (InternalFailure& e)
{
OpenPOWER on IntegriCloud