Skip to content

Commit

Permalink
Merge pull request #405 from souvik1914581/sr_save_pvm_keep_clear
Browse files Browse the repository at this point in the history
Save pvm_keep_and_clear to VPD
  • Loading branch information
SunnySrivastava1984 authored Oct 10, 2024
2 parents 1afaac0 + da3dfa2 commit 92a406a
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/bios_handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ void IbmBiosHandler::saveKeepAndClearToVpd(const std::string& i_KeepAndClearVal)
constants::pimServiceName, constants::systemVpdInvPath,
constants::utilInf, constants::kwdKeepAndClear);

if (auto l_pVal = std::get_if<std::string>(&l_kwdValueVariant))
if (auto l_pVal = std::get_if<types::BinaryVector>(&l_kwdValueVariant))
{
commonUtility::toLower(const_cast<std::string&>(i_KeepAndClearVal));

Expand All @@ -609,7 +609,17 @@ void IbmBiosHandler::saveKeepAndClearToVpd(const std::string& i_KeepAndClearVal)
l_valToUpdateInVpd.emplace_back((*l_pVal).at(0) &
~(constants::VALUE_1));
}
// TODO: Write API to be called to update in VPD.

if (-1 == m_manager->updateKeyword(
SYSTEM_VPD_FILE_PATH,
types::IpzData("UTIL", constants::kwdKeepAndClear,
l_valToUpdateInVpd)))
{
logging::logMessage("Failed to update " +
std::string(constants::kwdKeepAndClear) +
" keyword to VPD");
}

return;
}
logging::logMessage("Invalid type recieved for keep and clear from VPD.");
Expand Down

0 comments on commit 92a406a

Please sign in to comment.