Remove Hypervisor check for PowerVM target
Remove the dbus query to determine if system is PowerVM.
It is assumed that all systems are PowerVM.
Change-Id: I50d3bb76b469383618aa280c591459674f337130
Signed-off-by: Chris Cain <cjcain@us.ibm.com>
diff --git a/occ_status.cpp b/occ_status.cpp
index 57c8057..ceaf6fb 100644
--- a/occ_status.cpp
+++ b/occ_status.cpp
@@ -7,9 +7,6 @@
#include <fmt/core.h>
-#ifdef POWER10
-#include <com/ibm/Host/Target/server.hpp>
-#endif
#include <phosphor-logging/log.hpp>
#include <filesystem>
diff --git a/powermode.cpp b/powermode.cpp
index 589fb8f..14c3840 100644
--- a/powermode.cpp
+++ b/powermode.cpp
@@ -4,7 +4,9 @@
#include <fmt/core.h>
#include <sys/ioctl.h>
+#ifdef POWERVM_CHECK
#include <com/ibm/Host/Target/server.hpp>
+#endif
#include <org/open_power/OCC/Device/error.hpp>
#include <phosphor-logging/elog-errors.hpp>
#include <phosphor-logging/log.hpp>
@@ -190,13 +192,13 @@
// Check if Hypervisor target is PowerVM
bool isPowerVM()
{
+ bool powerVmTarget = true;
+#ifdef POWERVM_CHECK
namespace Hyper = sdbusplus::com::ibm::Host::server;
constexpr auto HYPE_PATH = "/com/ibm/host0/hypervisor";
constexpr auto HYPE_INTERFACE = "com.ibm.Host.Target";
constexpr auto HYPE_PROP = "Target";
- bool powerVmTarget = false;
-
// This will throw exception on failure
auto& bus = utils::getBus();
auto service = utils::getService(HYPE_PATH, HYPE_INTERFACE);
@@ -216,6 +218,7 @@
log<level::DEBUG>(
fmt::format("isPowerVM returning {}", powerVmTarget).c_str());
+#endif
return powerVmTarget;
}