fix interface usage for OperatingSystemState
OperatingSystemState property of
xyz.openbmc_project.State.OperatingSystem.Status should be PDI enum of
type OSStatus.
This commit fixes values to be compatible with PDI.
Tested: OperatingSystemState Monitor works
Signed-off-by: Andrei Kartashev <a.kartashev@yadro.com>
Change-Id: I5b3515f55870bbed12aa9e58da3a15a102f82310
diff --git a/src/peci_pcie.cpp b/src/peci_pcie.cpp
index 3183e6e..3ebadef 100644
--- a/src/peci_pcie.cpp
+++ b/src/peci_pcie.cpp
@@ -877,14 +877,20 @@
std::cerr << "Unable to read OS state value\n";
return;
}
-
- if (*state == "Standby")
+ // Note: Short version of OperatingSystemState value is
+ // deprecated and would be removed in the future
+ if ((*state == "Standby") ||
+ (*state == "xyz.openbmc_project.State.OperatingSystem."
+ "Status.OSStatus.Standby"))
{
peci_pcie::abortScan = false;
waitForOSStandbyDelay(io, objServer, osStandbyTimer,
cpuInfo);
}
- else if (*state == "Inactive")
+ else if ((*state == "Inactive") ||
+ (*state ==
+ "xyz.openbmc_project.State.OperatingSystem."
+ "Status.OSStatus.Inactive"))
{
peci_pcie::abortScan = true;
osStandbyTimer.cancel();
@@ -913,7 +919,12 @@
// If the OS state is in Standby, then BIOS is done and we can
// continue. Otherwise, we just wait for the match
- if (*state == "Standby")
+ // Note: Short version of OperatingSystemState value is deprecated
+ // and would be removed in the future
+
+ if ((*state == "Standby") ||
+ (*state == "xyz.openbmc_project.State.OperatingSystem.Status."
+ "OSStatus.Standby"))
{
waitForOSStandbyDelay(io, objServer, osStandbyTimer, cpuInfo);
}