utils: 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.
Signed-off-by: Andrei Kartashev <a.kartashev@yadro.com>
Change-Id: I2aae1e910decd79e6cf5eb03d96c7067e947f7de
diff --git a/src/Utils.cpp b/src/Utils.cpp
index 6d017ec..c030963 100644
--- a/src/Utils.cpp
+++ b/src/Utils.cpp
@@ -388,7 +388,10 @@
<< "\n";
return;
}
- biosHasPost = std::get<std::string>(state) != "Inactive";
+ auto& value = std::get<std::string>(state);
+ biosHasPost = (value != "Inactive") &&
+ (value != "xyz.openbmc_project.State.OperatingSystem."
+ "Status.OSStatus.Inactive");
},
post::busname, post::path, properties::interface, properties::get,
post::interface, post::property);
@@ -455,8 +458,11 @@
auto findState = values.find(post::property);
if (findState != values.end())
{
+ auto& value = std::get<std::string>(findState->second);
biosHasPost =
- std::get<std::string>(findState->second) != "Inactive";
+ (value != "Inactive") &&
+ (value != "xyz.openbmc_project.State.OperatingSystem."
+ "Status.OSStatus.Inactive");
}
});