Change OS state busname and objpath
Change the busname and object path of OS state interface.
This commit relies on the patch below:
[1] https://gerrit.openbmc.org/c/openbmc/x86-power-control/+/69589
Change-Id: Ia7a1aedb0d034f292d16a31e4da5f7317cde4d50
Signed-off-by: Potin Lai <potin.lai@quantatw.com>
diff --git a/src/allowlist-filter.cpp b/src/allowlist-filter.cpp
index 54d92e0..d02a826 100644
--- a/src/allowlist-filter.cpp
+++ b/src/allowlist-filter.cpp
@@ -73,7 +73,7 @@
static constexpr const char* restrictionModePath =
"/xyz/openbmc_project/control/security/restriction_mode";
static constexpr const char* systemOsStatusPath =
- "/xyz/openbmc_project/state/os";
+ "/xyz/openbmc_project/state/host0";
};
static inline uint8_t getSMMChannel()
@@ -345,7 +345,7 @@
const std::string filterStrPostIntfAdd =
rules::interfacesAdded() +
- rules::argNpath(0, "/xyz/openbmc_project/state/os");
+ rules::argNpath(0, "/xyz/openbmc_project/state/host0");
const std::string filterStrPlatStateChange =
rules::type::signal() + rules::member("PropertiesChanged") +
diff --git a/src/biosconfigcommands.cpp b/src/biosconfigcommands.cpp
index 16621e7..8fbdbf5 100644
--- a/src/biosconfigcommands.cpp
+++ b/src/biosconfigcommands.cpp
@@ -468,8 +468,8 @@
{
std::shared_ptr<sdbusplus::asio::connection> dbus = getSdBus();
Value variant =
- getDbusProperty(*dbus, "xyz.openbmc_project.State.OperatingSystem",
- "/xyz/openbmc_project/state/os",
+ getDbusProperty(*dbus, "xyz.openbmc_project.State.Host0",
+ "/xyz/openbmc_project/state/host0",
"xyz.openbmc_project.State.OperatingSystem.Status",
"OperatingSystemState");
auto& value = std::get<std::string>(variant);
@@ -484,8 +484,7 @@
catch (const std::exception& e)
{
phosphor::logging::log<phosphor::logging::level::ERR>(
- "'getDbusProperty' failed to read "
- "xyz.openbmc_project.State.OperatingSystem");
+ "'getDbusProperty' failed to read xyz.openbmc_project.State.Host0");
}
return postCompleted;