use PDI constants for ObjectMapper
PDI already defines the constants we need here, use those instead of
duplicating.
Tested: Inspection only.
Change-Id: I86ad46a4aac757aa7b377b1e1709088a1e457102
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
diff --git a/dbus-sdr/storagecommands.cpp b/dbus-sdr/storagecommands.cpp
index fb7879e..c22828b 100644
--- a/dbus-sdr/storagecommands.cpp
+++ b/dbus-sdr/storagecommands.cpp
@@ -29,6 +29,7 @@
#include <phosphor-logging/lg2.hpp>
#include <sdbusplus/message/types.hpp>
#include <sdbusplus/timer.hpp>
+#include <xyz/openbmc_project/ObjectMapper/common.hpp>
#include <filesystem>
#include <fstream>
@@ -37,6 +38,8 @@
#include <stdexcept>
#include <string_view>
+using ObjectMapper = sdbusplus::common::xyz::openbmc_project::ObjectMapper;
+
static constexpr bool DEBUG = false;
namespace dynamic_sensors::ipmi::sel
@@ -593,9 +596,8 @@
boost::system::error_code ec;
Paths subtreePaths = ipmi::callDbusMethod<Paths>(
- ctx, ec, "xyz.openbmc_project.ObjectMapper",
- "/xyz/openbmc_project/object_mapper",
- "xyz.openbmc_project.ObjectMapper", "GetSubTreePaths",
+ ctx, ec, ObjectMapper::default_service, ObjectMapper::instance_path,
+ ObjectMapper::interface, ObjectMapper::method_names::get_sub_tree_paths,
"/xyz/openbmc_project/inventory", 0,
std::array<const char*, 2>{
"xyz.openbmc_project.Inventory.Decorator.I2CDevice",