diff options
author | Vikram Bodireddy <vikram.bodireddy@intel.com> | 2019-12-06 13:18:00 +0300 |
---|---|---|
committer | Vikram Bodireddy <vikram.bodireddy@intel.com> | 2019-12-06 13:24:05 +0300 |
commit | 007a2cb0191757290f959aaaa20842db860b3fe6 (patch) | |
tree | 1a9fd52686f180c0a62eb88edd549775ef14cccf | |
parent | eddf621897090ba346b1aaa81a4b8be12076ab60 (diff) | |
download | provingground-007a2cb0191757290f959aaaa20842db860b3fe6.tar.xz |
PFR Manager minor fix for conditional statetment
PFR Manager minor fix for a line that uses lengthy conditinal
check, instead we use if-else conditional.
Change-Id: I03b2b08e6acb86d933aa952a81f51006cddd2355
Signed-off-by: Vikram Bodireddy <vikram.bodireddy@intel.com>
-rw-r--r-- | intel-pfr-manager/service/src/pfr_mgr.cpp | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/intel-pfr-manager/service/src/pfr_mgr.cpp b/intel-pfr-manager/service/src/pfr_mgr.cpp index ed97fd2..b773916 100644 --- a/intel-pfr-manager/service/src/pfr_mgr.cpp +++ b/intel-pfr-manager/service/src/pfr_mgr.cpp @@ -59,12 +59,20 @@ PfrVersion::PfrVersion(sdbusplus::asio::object_server &srv_, * xyz.openbmc_project.Software.Version. since these versions are already * active, so we should set "activation" to Active and * "RequestedActivation" to None. */ - std::string activation = - (imgType == ImageType::bmcRecovery || - imgType == ImageType::biosRecovery || - imgType == ImageType::cpldRecovery) - ? "xyz.openbmc_project.Software.Activation.Activations.StandbySpare" - : "xyz.openbmc_project.Software.Activation.Activations.Active"; + std::string activation; + if (imgType == ImageType::bmcRecovery || + imgType == ImageType::biosRecovery || + imgType == ImageType::cpldRecovery) + { + activation = + "xyz.openbmc_project.Software.Activation.Activations.StandbySpare"; + } + else + { + activation = + "xyz.openbmc_project.Software.Activation.Activations.Active"; + } + std::string reqActNone = "xyz.openbmc_project.Software.Activation.RequestedActivations.None"; auto activationIface = server.add_interface( |